codelucas / newspaper

newspaper3k is a news, full-text, and article metadata extraction in Python 3. Advanced docs:
https://goo.gl/VX41yK
MIT License
14.06k stars 2.11k forks source link

newspaper.build(...) error #447

Closed berteotti closed 6 years ago

berteotti commented 6 years ago

Hi, I'm new to python and I don't know how to fix this.

Traceback (most recent call last):
TypeError: get_request_kwargs() missing 1 required positional argument: 'headers'
  File "/usr/local/lib/python3.5/dist-packages/newspaper3k-0.2.2-py3.5.egg/newspaper/mthreading.py", line 38, in run
    func(*args, **kargs)
  File "/usr/local/lib/python3.5/dist-packages/newspaper3k-0.2.2-py3.5.egg/newspaper/network.py", line 105, in send
    self.resp = requests.get(self.url, **get_request_kwargs(self.timeout, self.useragent, self.proxies))
TypeError: get_request_kwargs() missing 1 required positional argument: 'headers'

Can someone help me please?

codelucas commented 6 years ago

Hey @GitHubSuperHero, this was a bug that happened last night for one hour - i have since pushed a fix.

can you please uninstall and reinstall newspaper3k?

pip uninstall newspaper3k
pip install newspaper3k
codelucas commented 6 years ago

If you are using master, please pull the latest commits with

git pull
berteotti commented 6 years ago

I solved the problem using

pip3 install git+https://github.com/codelucas/newspaper.git

Thanks codelucas