Skip to content

Add scraper for site: madame.lefigaro.fr#1890

Open
Nikash-B wants to merge 2 commits intohhursev:mainfrom
Nikash-B:site/madame.lefigaro.fr
Open

Add scraper for site: madame.lefigaro.fr#1890
Nikash-B wants to merge 2 commits intohhursev:mainfrom
Nikash-B:site/madame.lefigaro.fr

Conversation

@Nikash-B
Copy link
Copy Markdown

Resolves #1638

This PR adds support for scraping recipes from the "Madame Le Figaro" website. It introduces a new scraper class, integrates it into the scraper registry, and provides a test data file to verify its functionality.

New scraper integration:

  • Added a new MadameLeFigaro scraper in recipe_scrapers/madamelefigaro.py, including a custom schema extraction for instructions to handle the instruction headers present on the site.
  • Registered the new scraper in the recipe_scrapers/__init__.py module imports and the scraper registry dictionary, enabling automatic selection based on host. [1] [2]

Testing support:

  • Added a sample recipe data file for "madame.lefigaro.fr" in tests/test_data/madame.lefigaro.fr/madamelefigaro.json to facilitate testing and validation of the new scraper.

Specifcally parsed the instructions list to avoid headers being in list.
Captures aubergines-aux-anchois recipe whose HowToStep entries omit
the `name` field, exercising the super() fallback in
_extract_howto_instructions_text and raising branch coverage on
madamelefigaro.py from 84% to 95%.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I'd like to request support for Madame Figaro

1 participant