Application for parsing catalog items from search.wb.ru
Contains:
- Console command for parsing 1000 items per iteration and saving into ClickHouse.
- User-Form and Table View for visualizing data from ClickHouse.
- Docker
- Make
- PHP v8.1
- CakePHP v4.x
- ClickHouse v22.x
- Clone this repository:
git clone https://github.com/shirokovnv/wb_parser_example.git && cd wb_parser_example
- Rename
auth.json.example
toauth.json
and put your github oauth token there (needs for pullingeggheads/cakephp-clickhouse
library from VCS repo) - Rename
./config/app_local.example.php
to./config/app_local.php
- Run
make build
to build docker image - Run
make install
to install php dependencies - Run
make up
to run application containers
Visit http://localhost/
Run make shell
to enter inside php-app container
- Create Table:
bin/cake click_house_init
- Drop Table:
bin/cake click_house_drop
- Parse products:
bin/cake parse_products "QUERY STRING"
- Create
tmp
dir in project root folder - Run
make test
for unit-testing.
Tests use mockery/mockery
and fakerphp/faker
packages as dependencies.
Run make help
to see available commands.
Run make down
for shutting down application containers.
MIT. Please see the license file for more information.