mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
[generic] Respect the encoding in manifest
This commit is contained in:
parent
53ed7066ab
commit
61241abbb0
1 changed files with 4 additions and 1 deletions
|
@ -2508,7 +2508,10 @@ def _real_extract(self, url):
|
|||
|
||||
# Is it an RSS feed, a SMIL file, an XSPF playlist or a MPD manifest?
|
||||
try:
|
||||
doc = compat_etree_fromstring(webpage.encode('utf-8'))
|
||||
try:
|
||||
doc = compat_etree_fromstring(webpage)
|
||||
except compat_xml_parse_error:
|
||||
doc = compat_etree_fromstring(webpage.encode('utf-8'))
|
||||
if doc.tag == 'rss':
|
||||
return self._extract_rss(url, video_id, doc)
|
||||
elif doc.tag == 'SmoothStreamingMedia':
|
||||
|
|
Loading…
Reference in a new issue