kopia lustrzana https://github.com/ytdl-org/youtube-dl
Fix detection of the webpage charset if it's declared using ' instead of "
Like in "<meta charset='utf-8'/>"pull/1347/head
rodzic
2891932bf0
commit
0d75ae2ce3
|
@ -150,7 +150,7 @@ class InfoExtractor(object):
|
|||
if m:
|
||||
encoding = m.group(1)
|
||||
else:
|
||||
m = re.search(br'<meta[^>]+charset="?([^"]+)[ /">]',
|
||||
m = re.search(br'<meta[^>]+charset=[\'"]?([^\'")]+)[ /\'">]',
|
||||
webpage_bytes[:1024])
|
||||
if m:
|
||||
encoding = m.group(1).decode('ascii')
|
||||
|
|
Ładowanie…
Reference in New Issue