MacOS_Parsers/Parser_NEXT/config.yaml
2025-08-25 14:46:19 +03:00

59 lines
2.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

base_url: "https://www.next.pl/en"
locale: "en-GB"
timezoneId: "Europe/Warsaw"
# На время отладки удобно видеть браузер:
headless: false
nav_timeout_ms: 60000
wait_timeout_ms: 30000
retries: 3
# Рейт-лимит можно настраивать при масштабировании
rate_limit_per_host_per_sec: 1.0
scroll:
# Старые параметры (используются в резервном auto_scroll и для пауз)
max_scrolls: 80
pause_ms_between_scrolls_min: 300
pause_ms_between_scrolls_max: 700
stop_if_no_new_items_after: 8
# Новые параметры для auto_scroll_until_total
hard_max_scrolls: 2500 # предохранитель на максимум скроллов
wait_networkidle_timeout_ms: 8000 # ожидание networkidle после каждого скролла
selectors:
# карточки товаров
product_tile: '[data-testid="plp-product-grid-item"], [data-testid="product-tile"], .ProductCard, [data-qa="plp-product"]'
product_link: 'a[href*="/style/"], a[href*="/p/"], a[data-testid="productLink"]'
product_name: '[data-testid="product-name"], .productName, [itemprop="name"]'
product_price: '[data-testid="price"], [itemprop="price"], .price'
# признак готовности
grid_ready: 'script[id^="next-product-summary-script-"], [data-testid="plp-product-grid-item"], [data-testid="product-grid"], .plpGrid, [data-qa="plp-grid"]'
# счётчик общего количества в шапке (например "(434)")
total_count: '#plp-seo-heading .esi-count, .esi-count'
xhr_patterns:
- "/search"
- "/api/search"
- "/plp"
- "/productsummary"
output:
folder: "records_folder"
excel_prefix: "next_dump"
csv_also: true
jsonl_also: true
pdp:
max_concurrency: 3 # одновременно открытых PDP-страниц
nav_timeout_ms: 45000
wait_timeout_ms: 15000
debug:
dump_always: false # true — чтобы писать дампы на каждом шаге