-2
刚学完网络抓取自动化无聊的东西书,但我仍然很困惑iter_content函数?它实际上做了什么?iter_content()函数到底做了什么?
尝试使用正常的下载网页:
note = open('download.txt', 'w')
note.write(request)
note.close()
但结果是不同的使用:
note = open('download.txt', 'wb')
for chunk in request.iter_content(100000):
note.write(chunk)
note.close()
???