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

Article HTML Returning Null #131

Closed
theshapguy opened this issue Mar 23, 2015 · 1 comment
Closed

Article HTML Returning Null #131

theshapguy opened this issue Mar 23, 2015 · 1 comment

Comments

@theshapguy
Copy link

from newspaper import Article

url = 'http://fox13now.com/2013/12/30/new-year-new-laws-obamacare-pot-guns-and-drones/'
article = Article(url)
article.download()
article.parse()
print article.article_html
#print(article.__dict__)

I tried it with multiple urls, it is still returning null. Let me know if you need more example urls.

@codelucas
Copy link
Owner

You are forgetting to set the configuration for keeping article HTML. This is default set to False to save resources because many people don't use this feature.

My screen:

>>> a = Article(url, keep_article_html=True)
>>> 
>>> a.download()
>>> a.parse()
>>> print len(a.article_html)
4155

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

No branches or pull requests

2 participants