Reputation: 835
I'm getting really confused over this.
Here's what I'm using.
I'm building a scraper and trying to use requests.get()
to connect to a url.
This is a link from indeed that jumps to another link. Here is the code:
r = rqs.get('https://www.indeed.hk/rc/clk?jk=ab794b2879313f04&fccid=a659206a7e1afa15')
Here's the error raised:
File "/Users/cecilialee/anaconda/envs/py2/lib/python2.7/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
SSLError: HTTPSConnectionPool(host='www.recruit.com.hk', port=443): Max retries exceeded with url: /jobseeker/JobDetail.aspx?jobOrder=L04146652 (Caused by SSLError(SSLEOFError(8, u'EOF occurred in violation of protocol (_ssl.c:661)'),))
Setting verify = False
does not solve this error.
I've searched online but couldn't find a solution that can help to fix my issue. Can anyone help?
Upvotes: 0
Views: 9357
Reputation: 1520
You can use HTTP (but not https) to get info from the site.
>>> response = requests.get('http://www.recruit.com.hk')
>>> response.status_code
200
>>> len(response.text)
I tried you code, it's ok:
>>> r = requests.get('https://www.indeed.hk/rc/clk?jk=ab794b2879313f04&fccid=a659206a7e1afa15')
>>> r.status_code
200
>>> len(r.text)
34272
My environment:
python 2.7.10 requests==2.5.0
Upvotes: 3