When I issue a requests.get request for website design-dogs[.]com, the HTML that's returned is not decoded properly.
response_size = 0
with requests.get("https://design-dogs[.]com", stream = True) as response:
for chunk in response.iter_content(chunk_size = 1000000, decode_unicode = True):
response_size += len(chunk)
if response_size > 2048000:
file_buffer = ""
response.close()
print(file_buffer)
sys.exit(1)
file_buffer += chunk
response.close()
print(file_buffer)
Output, title excerpt only:
æ ªå¼ä¼šç¤¾ デザインドッグスWhen it should be:
株式会社 デザインドッグスWhy is this happening? This doesn't occur on any other website.