different between demo website and python code
See original GitHub issueHi,
I use your demo web site to extract a CNN news, but I found the results are different. The url is http://edition.cnn.com/2014/03/27/sport/brooklyn-nets-owner-russia/index.html
By your demo website, it will show
Pro basketball is a staple of American athletics…
But I use python to get text by “Article.text”, it will show
Story highlights Russian billionaire owner of Nets considers ownership move to Russian jurisdiction
The move is “not in any way tying it to the current political situation,” the owner’s rep said
Obama signed an order that can target Russian companies vital to its economy
Pro basketball is a staple of American athletics, taking its place with Major…
Did I use the wrong method? My python is 3.6 and newspaper3k is 0.2.2.
from newspaper import Article
def news_extract(news_url):
article = Article(news_url, fetch_images=False,)
article.download()
article.parse()
text = article.text
print(text)
source = 'http://edition.cnn.com/2014/03/27/sport/brooklyn-nets-owner-russia/index.html'
news_extract(source)
Thank you
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
13 Real-World Examples of Python in Web Development
Which tech companies of today are great examples of Python in web development? From Netflix to Instagram, we've picked 13 out of the...
Read more >Python Web Applications: Deploy Your Script as a Flask App
In this tutorial, you'll learn how to go from a local Python script to a fully deployed Flask web application that you can...
Read more >Python Website Full Tutorial - Flask, Authentication ... - YouTube
In this video, I'm going to be showing you how to make a website with Python, covering Flask, authentication, databases, and more.
Read more >Selenium with Python Tutorial: How to run Automated Tests
Read step-by-step Selenium Python Tutorial. Learn how to run your first automation tests in Selenium and Python using code samples and examples.
Read more >How To Build a Website With Python - Digital.com
Python is becoming the internet coding language of choice due to its versatility. Learn how to build a website with Python from our...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@moveurbody I think that the demo website runs on an older version of newspaper (on the python-2 branch). This should explain the different results you’re getting…
Hey, I think you might want to call
article.nlp()
and then access the content viaarticle.summary
?