newspaper icon indicating copy to clipboard operation
newspaper copied to clipboard

SSLError Certificate Verify Failed

Open marshallgrimmett opened this issue 2 years ago • 2 comments

Hi, I am trying to use newspaper3k on my work computer and I keep getting an SSLError and the articles won't download. The error happens when trying to parse the article and when I do article.html it returns an empty string, "". I was able to get it to work with a couple sites, but every article I have tried produces this error. It doesn't even work for the sample article given in the README file.

One thing to note is that I have it working on my personal computer, so maybe there is something blocking it within my corporate laptop?

I am using Python version 3.9.8

ArticleException: Article download() failed with HTTPSConnectionPool(host='fox13now.com', port=443): Max retries exceeded with url: /2013/12/30/new-year-new-laws-obamacare-pot-guns-and-drones/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) on URL http://fox13now.com/2013/12/30/new-year-new-laws-obamacare-pot-guns-and-drones/

Thank you

marshallgrimmett avatar Nov 12 '21 20:11 marshallgrimmett

Well I fixed the problem by downgrading Python to version 3.8.5 and it worked!

marshallgrimmett avatar Nov 12 '21 20:11 marshallgrimmett

@marshallgrimmett Not sure what was causing that. I was on 3.9.7 previously and pulled articles okay.

I have a fork that runs on 3.10 here. It has a few other PRs in it, but also prunes thai stop words due to a dependency unable to run 3.10.

banagale avatar Nov 12 '21 23:11 banagale