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 found that my virus detector/firewall was causing this problem. "Online Shield" part of AVG.
python3 FYI
from urllib import request
import http.client
import os
url = 'http://shop.o2.co.uk/mobile_phones/Pay_Monthly/smartphone/all_brand'
try:
response = request.urlopen(url)
file = response.read()
except http.client.IncompleteRead as e:
file = e.partial
except Exception as result:
print("Unkonw error" + str(result))
return
# save file
with open(file_path, 'wb') as f:
print("save -> %s " % file_path)
f.write(file)