我要下一部很大的電視劇,結果下到15個video的時候卡住,原因應該是youku會定時更新cookie,導致下載失敗(懷疑),希望加入超時機制,發現失敗重新獲取地址下載。
作者辛苦,這個東西做得真的很不錯,非常感謝
順便把結束時候卡住的日誌發過來:File "youku.py", line 169, in
main()
File "youku.py", line 166, in main
script_main('youku', youku_download, youku_download_playlist)
File "....../youku-lixian/common.py", line 262, in script_main
download_playlist(url)
File "youku.py", line 160, in youku_download_playlist
youku_download(id)
File "youku.py", line 111, in youku_download
youku_download_by_id(id2, title, output_dir)
File "youku.py", line 99, in youku_download_by_id
download_urls(urls, title, file_type_of_url(urls[0]), total_size, output_dir)
File ".....youku-lixian/common.py", line 213, in download_urls
url_save(url, filepath, bar, refer=refer)
File ".....youku-lixian/common.py", line 88, in url_save
buffer = response.read(1024*256)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 553, in read
s = self.fp.read(amt)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
卡在common.py", line 88
我要下一部很大的電視劇,結果下到15個video的時候卡住,原因應該是youku會定時更新cookie,導致下載失敗(懷疑),希望加入超時機制,發現失敗重新獲取地址下載。 作者辛苦,這個東西做得真的很不錯,非常感謝 順便把結束時候卡住的日誌發過來:File "youku.py", line 169, in
main()
File "youku.py", line 166, in main
script_main('youku', youku_download, youku_download_playlist)
File "....../youku-lixian/common.py", line 262, in script_main
download_playlist(url)
File "youku.py", line 160, in youku_download_playlist
youku_download(id)
File "youku.py", line 111, in youku_download
youku_download_by_id(id2, title, output_dir)
File "youku.py", line 99, in youku_download_by_id
download_urls(urls, title, file_type_of_url(urls[0]), total_size, output_dir)
File ".....youku-lixian/common.py", line 213, in download_urls
url_save(url, filepath, bar, refer=refer)
File ".....youku-lixian/common.py", line 88, in url_save
buffer = response.read(1024*256)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 553, in read
s = self.fp.read(amt)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
卡在common.py", line 88