From 5e7c32c27fe87fd4d457aee529154fcdb56547ea Mon Sep 17 00:00:00 2001 From: makexjtu Date: Sat, 20 Feb 2016 23:42:03 +1100 Subject: [PATCH] =?UTF-8?q?Fix=20the=20"has=20already=20been=20downloaded?= =?UTF-8?q?=E2=80=9D=20quetion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hey, I was downloading a long video from iqiyi.com and only first segment of the video was downloaded. The rest segments weren’t downloaded as the output message said that the video “has already been downloaded” In fact, the following video in _TESTS reports the same problem to me. 'url': 'http://www.iqiyi.com/v_19rrhnnclk.html';, 'info_dict': { 'id': 'e3f585b550a280af23c98b6cb2be19fb', 'title': '名侦探柯南第752集', It looks like 'title' value in entries[i].update() step remains the same for different segments of the video, which made youtube-dl think that all segments are the same (with same pathname). I changed into 'title': title + '_part' + str(i + 1), and the problem went away. By the way, could anyone give me a clue as to how the enc_key and algorithm in construct_video_urls() are obtained? Looks like enc_key need update every once a while. I’m really curious to know. Thank you very much. --- youtube_dl/extractor/iqiyi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/iqiyi.py b/youtube_dl/extractor/iqiyi.py index 541fe7ae3..76afede8d 100644 --- a/youtube_dl/extractor/iqiyi.py +++ b/youtube_dl/extractor/iqiyi.py @@ -573,7 +573,7 @@ class IqiyiIE(InfoExtractor): entries[i].update( { 'id': '%s_part%d' % (video_id, i + 1), - 'title': title, + 'title': title + '_part' + str(i + 1), } )