I am trying to fetch some data from a website. However it returns me incomplete read
. The data I am trying to get is a huge set of nested links. I did some rese
I tried all these solutions and none of them worked for me. Actually, what did work is instead of using urllib, I just used http.client (Python 3)
conn = http.client.HTTPConnection('www.google.com')
conn.request('GET', '/')
r1 = conn.getresponse()
page = r1.read().decode('utf-8')
This works perfectly every time, whereas with urllib it was returning an incompleteread exception every time.