3

I am unable to issue a request to piratebay using requests with python2.7. I did the same with python3.4 and it worked ok. The line which I'm trying to execute:

r = requests.get("http://thepiratebay.se/browse/201", verify=False)

I did the verify=False to try and escape all the SSL jargon to no avail. It's a small personal project anyway..

I also tried to change the version of SSL using this link, however it still is giving me

requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error.`

Thanks

0

1 Answer 1

2

The site thepiratebay.se requires Server Name Indication (SNI) and will throw an alert if the client does not support it. While python3 supported SNI for a while already with python2.7 SNI was only added with version 2.7.9. My guess is that you are using an older version of python 2.7 and that's why run into this error.

Sign up to request clarification or add additional context in comments.

1 Comment

My version is 2.7.6, so I guess you're right.. I ended changing to python3 again and opening the magnet link in transmission directly. I was just complicating things trying to use libtorrent. Oh well! Thank you for your answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.