laplaceon / newspaper

MIT License
0 stars 0 forks source link

title is returned as a config object #1

Open laplaceon opened 10 months ago

laplaceon commented 10 months ago

I am using the latest newspaper3k and python 3.6 and I got the following error:

from newspaper import Article, Config
config = Config()
config.browser_user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'

a = Article("http://xoshiro.di.unimi.it/xoshiro256starstar.c", config)
a.download()
a.parse()
In [24]: a.title
Out[24]: <newspaper.configuration.Configuration at 0x10b30d518>

The above code returns title as a string on other url. This gave me a config object.

resolvd-ai[bot] commented 10 months ago

I have identified the problem in the code and developed a fix. I will now proceed with testing the solution and creating a commit.

resolvd-ai[bot] commented 10 months ago

The solution has been tested and verified. I have created a commit with the fix and initiated a pull request. The pull request description includes a detailed explanation of how the fix addresses and resolves the issue.