summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2014-05-15 12:39:33 +0200
committerPhilipp Hagemeister <[email protected]>2014-05-15 12:39:33 +0200
commit5afa7f8beefcd9b34035f821ad1cecbcf49a6db8 (patch)
tree4eddf85d9cce8629a0947c82cc8021bd28909466
parentec8deefc275c2f7ddbbd9e78397f2e202c4a621f (diff)
downloadyoutube-dl-5afa7f8beefcd9b34035f821ad1cecbcf49a6db8.tar.gz
youtube-dl-5afa7f8beefcd9b34035f821ad1cecbcf49a6db8.zip
[extractor/common] --write-pages: Correct file name if video_id is None
-rw-r--r--youtube_dl/extractor/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 11b31db88..1e366a13c 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