-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()
???