Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recipezaar.py fails to import from webpage #298

Closed
ockham opened this issue Dec 24, 2012 · 4 comments
Closed

recipezaar.py fails to import from webpage #298

ockham opened this issue Dec 24, 2012 · 4 comments

Comments

@ockham
Copy link
Collaborator

ockham commented Dec 24, 2012

Converted from SourceForge issue 1630895, submitted by SourceForge user nobody on 2007-01-08 20:43:28 UTC.

Traceback (most recent call last):
File "/usr/share/gourmet/GourmetRecipeManager.py", line 920, in import_webpageg
self.run_import(i,url,display_errors=False)
File "/usr/share/gourmet/GourmetRecipeManager.py", line 1112, in run_import
t.start()
File "/usr/share/gourmet/GourmetFauxThreads.py", line 38, in start
self.target_func()
File "/usr/share/gourmet/GourmetFauxThreads.py", line 43, in target_func
GourmetThreads.SuspendableThread.target_func(self)
File "/usr/share/gourmet/GourmetThreads.py", line 38, in target_func
self.c.run()
File "/usr/share/gourmet/importers/html_importer.py", line 448, in run
self.d = scrape_url(self.url, progress=self.prog)
File "/usr/share/gourmet/importers/html_importer.py", line 368, in scrape_url
return bss.scrape_url(url,progress=progress)
File "/usr/share/gourmet/importers/html_importer.py", line 107, in scrape_url
return self.scrape()
File "/usr/share/gourmet/importers/html_importer.py", line 117, in scrape
self.apply_rule(rule)
File "/usr/share/gourmet/importers/html_importer.py", line 128, in apply_rule
self.store_tag(store_as,tag,retmethod,post_processing)
File "/usr/share/gourmet/importers/html_importer.py", line 245, in store_tag
val=self.post_process(post_processing, val, tag)
File "/usr/share/gourmet/importers/html_importer.py", line 152, in post_process
return post_processing(value,tag)
File "/usr/share/gourmet/importers/html_plugins/recipezaar.py", line 29, in recipezaar_ingredient_parser
grouptag = tag.fetch('div')
AttributeError: 'NoneType' object has no attribute 'fetch'

Here's my version of Python:
Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user thomas_hinkle on 2007-01-12 02:00:54 UTC.

Logged In: YES
user_id=1030390
Originator: NO

I have just committed a change so that errors like this will trigger a fall-back to the generic importer. This is far better than the situation you're in -- which is that you can't import anything from that website. Of course, it would also be nice to fix automatic import for that website, but that's a secondary concern (hence my downgrading the priority for this bug)

@ockham
Copy link
Collaborator Author

ockham commented Dec 24, 2012

Submitted by SourceForge user nobody on 2007-01-08 20:44:59 UTC.

Logged In: NO

Email: [email protected]

@pounamu
Copy link
Contributor

pounamu commented May 14, 2014

Should this be closed? The generic importer has been implemented and recipezaar.com is no longer around anyway.

@ockham
Copy link
Collaborator Author

ockham commented May 18, 2014

Yeah, let's close this. No remnants of the recipezaar importer seem to be left. That domain redirects to food.com these days, so we might consider adding a specific importer for that website if it turns out to be popular among our users.

@ockham ockham closed this as completed May 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants