It is simple application for crawler products from amz with jan number
- Clone app
git clone https://github.com/thanhtungka91/smartshopping.git
- Run app (if you dont have composer, please install php, composer before)
https://getcomposer.org/doc/00-intro.md
Then install php extension
brew search intl
brew install homebrew/php/php71-intl
Then install cakephp and libraies
composer install
- Start App
bin/cake server -p 8765
Then visit http://localhost:8765
to see the welcome page.
-
Configue database Read and edit
config/app.php
and setup the'Datasources'
and any other configuration relevant for your application. -
Create Database a. Create database, please note that need to set utf8 which is used for saving japanese charater latter.
CREATE DATABASE smartshopping
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
b. Create products table
CREATE TABLE `smartshopping`.`products` (
`product_id` INT NOT NULL AUTO_INCREMENT,
`product_name` VARCHAR(255) NULL,
`product_jan` VARCHAR(45) NULL,
`product_asin` VARCHAR(45) NULL,
`product_amz_url` VARCHAR(255) NULL,
PRIMARY KEY (`product_id`));
- Copy file jan to smartshopping directory example file
4904740511511
4973512257896
- Run crawler http://localhost:8765/crawler