Christian Adib
Christian Adib

Reputation: 121

Author extraction in newspaper example is not working

I'm trying to use newspaper3k to extract speaker names from webpages containing speeches with no luck. Following the documentation of the package, article.authors seems to always return an empty list.

Using the example in the docs here.

In:

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()
article.authors

returns

Out: []

Instead of the expected

Out: ['Leigh Ann Caldwell', 'John Honway']

It's not working for many other examples too.

Upvotes: 0

Views: 219

Answers (1)

Jithin Johnson
Jithin Johnson

Reputation: 372

Refer to this issue on github 485, newspaper3k seems to be broken in python3, there is a workaround mentioned in the issue if you downgrade to python2.

Upvotes: 1

Related Questions