29 lines
724 B
Python
29 lines
724 B
Python
"""
|
|
Rohlik.cz Price Scraper - Configuration
|
|
Version: 1.0.0
|
|
Date: 2026-05-31
|
|
|
|
Central configuration for the Rohlik.cz price scraper.
|
|
Loads environment variables from .env file for credentials and MongoDB connection.
|
|
Defines scraping parameters (scroll behavior, timeouts) and URL constants.
|
|
"""
|
|
|
|
import os
|
|
from pathlib import Path
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv(Path(__file__).parent / ".env")
|
|
|
|
MONGO_URI = os.getenv("MONGO_URI", "mongodb://192.168.1.76:27017")
|
|
MONGO_DB = os.getenv("MONGO_DB", "rohlik")
|
|
|
|
ROHLIK_EMAIL = os.getenv("ROHLIK_EMAIL", "")
|
|
ROHLIK_PASSWORD = os.getenv("ROHLIK_PASSWORD", "")
|
|
|
|
BASE_URL = "https://www.rohlik.cz"
|
|
|
|
AUTH_STATE_PATH = "auth_state.json"
|
|
|
|
SCROLL_PAUSE = 1.5
|
|
MAX_SCROLLS = 50
|