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

problem loading newspaper module #206

Closed nahuelange closed 8 years ago

nahuelange commented 8 years ago

Loading the module I got this error:

/home/nahuel/workspace/newspaper/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py in <module>()
     68 _openssl_versions = {
     69     ssl.PROTOCOL_SSLv23: OpenSSL.SSL.SSLv23_METHOD,
---> 70     ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD,
     71     ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD,
     72 }

AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
yprez commented 8 years ago

@nahuelange what version of newspaper are you using? at what step does this happen?

The latest (newspaper3k) version only supports Python 3, but if you're running that I think it would fail earlier...

If you're using the Python 2 version, maybe it's an outdated version of requests or urllib3... can you do a pip freeze and post the output?

nahuelange commented 8 years ago

I use last version for python2 (installed with pip install) in a virtualenv with no-site-packages. This happen just after installing it, but now it's working…