From 5afa7f8beefcd9b34035f821ad1cecbcf49a6db8 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Thu, 15 May 2014 12:39:33 +0200 Subject: [PATCH] [extractor/common] --write-pages: Correct file name if video_id is None --- youtube_dl/extractor/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 11b31db884..1e366a13c7 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -242,7 +242,7 @@ class InfoExtractor(object): url = url_or_request.get_full_url() except AttributeError: url = url_or_request - basen = video_id + '_' + url + basen = '%s_%s' % (video_id, url) if len(basen) > 240: h = u'___' + hashlib.md5(basen.encode('utf-8')).hexdigest() basen = basen[:240 - len(h)] + h