diff options
Diffstat (limited to 'youtube_dl/extractor/common.py')
| -rw-r--r-- | youtube_dl/extractor/common.py | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 692d828da..02a82dc57 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -63,6 +63,7 @@ class InfoExtractor(object):                      * tbr        Average bitrate of audio and video in KBit/s                      * abr        Average audio bitrate in KBit/s                      * acodec     Name of the audio codec in use +                    * asr        Audio sampling rate in Hertz                      * vbr        Average video bitrate in KBit/s                      * vcodec     Name of the video codec in use                      * filesize   The number of bytes, if known in advance @@ -220,6 +221,8 @@ class InfoExtractor(object):                            webpage_bytes[:1024])              if m:                  encoding = m.group(1).decode('ascii') +            elif webpage_bytes.startswith(b'\xff\xfe'): +                encoding = 'utf-16'              else:                  encoding = 'utf-8'          if self._downloader.params.get('dump_intermediate_pages', False): @@ -236,7 +239,7 @@ class InfoExtractor(object):              except AttributeError:                  url = url_or_request              if len(url) > 200: -                h = hashlib.md5(url).hexdigest() +                h = u'___' + hashlib.md5(url).hexdigest()                  url = url[:200 - len(h)] + h              raw_filename = ('%s_%s.dump' % (video_id, url))              filename = sanitize_filename(raw_filename, restricted=True) | 
