usse/scrape/funda-scraper/funda_scraper/config/core.py

18 lines
363 B
Python
Raw Normal View History

2023-12-22 14:26:01 +00:00
"""Configuration used for scraping """
from pathlib import Path
import yaml
from diot import Diot
from yaml.loader import SafeLoader
import funda_scraper
PACKAGE_ROOT = Path(funda_scraper.__file__).resolve().parent
CONFIG_PATH = PACKAGE_ROOT / "config/config.yaml"
with open(CONFIG_PATH) as f:
data = yaml.load(f, Loader=SafeLoader)
config = Diot(data)