remaudcorentin-dev / python-marmiton

Python API to search & get recipes from the 'marmiton.com' website (web crawler, unofficial)
MIT License
42 stars 18 forks source link

Error with marmiton.get #2

Closed guillaumecostanza closed 1 year ago

guillaumecostanza commented 4 years ago

Hi !

Hi have the following error when running the provider example in a fresh install :

site-packages/marmiton/init.py", line 79, in get name = soup.find("h1", {"class", "main-title "}).get_text().strip(' \t\n\r') AttributeError: 'NoneType' object has no attribute 'get_text'

Thanks for the package anyway !

YanisK33 commented 4 years ago

Hi! I have the same issue... Do you hopefully find a fix for it ?

CVhp commented 4 years ago

Hi! You can change the line : main_data = soup.find("div", {"class": "m_content_recette_main"}) by : main_data = soup.find("div", {"class": "content-recipe"})

I also had to remove the last "/" of this url : base_url = "http://www.marmiton.org" in init.py line 72

I hope it will help you.

remaudcorentin-dev commented 1 year ago

Fixed in last version (0.4.2)