diff --git a/README.md b/README.md index cea617c..88e144c 100644 --- a/README.md +++ b/README.md @@ -33,19 +33,6 @@ iaai init-db Готовый `.env` уже в репозитории и настроен на SQLite ничего менять не нужно. -### Команды для локального запуска и проверки - -```bash -pip install -e . -playwright install chromium -iaai init-db -iaai sync-listing --limit 10 -# С видимым браузером -iaai --headless false sync-listing --limit 5 -# Для просмотра того что записалось -python -c "import sqlite3; c=sqlite3.connect('iaai_scraper.db'); q=c.cursor(); print('cars:', q.execute('select count(*) from cars').fetchone()[0]); print('images:', q.execute('select count(*) from images').fetchone()[0]); rows=q.execute('select id, brand, model, year, origin_id from cars order by id desc limit 10').fetchall(); [print(r) for r in rows]" -``` - ### Запуск парсера **Скрапинг одной машины:** @@ -72,6 +59,12 @@ iaai collect-listing --make Toyota iaai --headless false sync-vehicle "https://www.iaai.com/VehicleDetail/45089484~US" ``` +**Проверка, что записалось в базу (`iaai_scraper.db`):** + +```bash +python -c "import sqlite3; c=sqlite3.connect('iaai_scraper.db'); q=c.cursor(); print('cars:', q.execute('select count(*) from cars').fetchone()[0]); print('images:', q.execute('select count(*) from images').fetchone()[0]); rows=q.execute('select id, brand, model, year, origin_id from cars order by id desc limit 10').fetchall(); [print(r) for r in rows]" +``` + Результаты сохраняются в `artifacts/json/` и в БД `iaai_scraper.db`. ### Полный стек (API + Worker + Beat)