iambus / youku-lixian

优酷下载脚本,顺便支持其他……
Other
849 stars 265 forks source link

youku playlist下载失败 #23

Closed poetzhangzi closed 12 years ago

poetzhangzi commented 12 years ago

我要下一部很大的電視劇,結果下到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

iambus commented 12 years ago

下载完全没有使用cookie,应该没关系了。 可能就是网络有点问题。现在代码里还没有重传什么的。先手动重启下吧(如果发现手动重启后要重新下载很多东西,或者覆盖了旧文件,可以报告bug)。

poetzhangzi commented 12 years ago

thx,重新啓動不會覆蓋下載,好像那個情況也不是一直發生,謝謝