GourmandRecipeManager / gourmand

A recipe manager for desktop with the possibilities to import, organize, and tweak recipes
GNU General Public License v2.0
67 stars 24 forks source link

Unable to import a recipe #147

Open marillat opened 1 year ago

marillat commented 1 year ago

I'm not sure if the problem come from gourmand or recipe-scrapers

Gourmand 1.1.0 RC3 Debian amd64

Tested with this page in Spanish, English and French. Gourmand return always the same error. https://www.webtenerifefr.com/propos-tenerife/gastronomie/produits/recettes/garbanzas-compuestas/

(gourmand:230559): Gtk-WARNING **: 12:05:48.032: ../../../gtk/gtkwidget.c:8652: widget not within a GtkWindow
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gourmand/main.py", line 657, in do_import
    self.importManager.offer_import(parent=self.app.get_toplevel())
  File "/usr/lib/python3/dist-packages/gourmand/importers/importManager.py", line 80, in offer_import
    import_interactivally(unsupported)
  File "/usr/lib/python3/dist-packages/gourmand/importers/interactive_importer.py", line 521, in import_interactivally
    importer.images = [img['src'] for img in soup.find_all('img')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gourmand/importers/interactive_importer.py", line 522, in <listcomp>
    if img['src'].startswith('http')]
       ~~~^^^^^^^
  File "/usr/lib/python3/dist-packages/bs4/element.py", line 1535, in __getitem__
    return self.attrs[key]
           ~~~~~~~~~~^^^^^
KeyError: 'src'