X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fcommon.py;h=db472aace8faabb465e9c93b7ff6013ccece4e8e;hb=ad3bc6acd5d6724875b9fa59f9b5cdb9b904ec91;hp=11b31db88422229b37c85a96ed1df3746867bf5a;hpb=24e6ec8ac862267b100539fbe745ec87015bbc3d;p=youtube-dl diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 11b31db88..db472aace 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -113,6 +113,8 @@ class InfoExtractor(object): webpage_url: The url to the video webpage, if given to youtube-dl it should allow to get the same result again. (It will be set by YoutubeDL if it's missing) + categories: A list of categories that the video falls in, for example + ["Sports", "Berlin"] Unless mentioned otherwise, the fields should be Unicode strings. @@ -242,7 +244,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