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

Handle when HTML can't be parsed from elements #60

Closed
michaelhelmick opened this issue Feb 3, 2017 · 0 comments
Closed

Handle when HTML can't be parsed from elements #60

michaelhelmick opened this issue Feb 3, 2017 · 0 comments
Labels

Comments

@michaelhelmick
Copy link
Owner

http://enewspaper.makemynewspaper.com/8e89682f8b8049/the-sms-times#.WH5m_1MrKM8 does not have an <html> tag which causes:

File "lassie/core.py", line 189, in fetch
    lang = soup.html.get('lang') if soup.html.get('lang') else soup.html.get('xml:lang')
'NoneType' object has no attribute 'get'

We can inject the HTML tag if applicable and skip the above code if soup.html does not exist.

michaelhelmick added a commit that referenced this issue Feb 3, 2017
Fixes #60, attempts to add HTML tag if non exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant