This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
youtube-dl
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
1.1k
Wiki
Activity
Browse Source
Deal with implicitly UTF-16 decoded webpages
These webpages don't specify an encoding and rely on the BOM
totalwebcasting
Philipp Hagemeister
11 years ago
parent
5aafe895fc
commit
b60016e831
1 changed files
with
2 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
youtube_dl/extractor/common.py
+ 2
- 0
youtube_dl/extractor/common.py
View File
@ -220,6 +220,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
)
:
Write
Preview
Loading…
Cancel
Save