mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	Merge pull request #7296 from jaimeMF/xml_attrib_unicode
Use a wrapper around xml.etree.ElementTree.fromstring in python 2.x (…
This commit is contained in:
		| @@ -9,6 +9,7 @@ import sys | ||||
| from .common import InfoExtractor | ||||
| from .youtube import YoutubeIE | ||||
| from ..compat import ( | ||||
|     compat_etree_fromstring, | ||||
|     compat_urllib_parse_unquote, | ||||
|     compat_urllib_request, | ||||
|     compat_urlparse, | ||||
| @@ -21,7 +22,6 @@ from ..utils import ( | ||||
|     HEADRequest, | ||||
|     is_html, | ||||
|     orderedSet, | ||||
|     parse_xml, | ||||
|     smuggle_url, | ||||
|     unescapeHTML, | ||||
|     unified_strdate, | ||||
| @@ -1238,7 +1238,7 @@ class GenericIE(InfoExtractor): | ||||
|  | ||||
|         # Is it an RSS feed, a SMIL file or a XSPF playlist? | ||||
|         try: | ||||
|             doc = parse_xml(webpage) | ||||
|             doc = compat_etree_fromstring(webpage.encode('utf-8')) | ||||
|             if doc.tag == 'rss': | ||||
|                 return self._extract_rss(url, video_id, doc) | ||||
|             elif re.match(r'^(?:{[^}]+})?smil$', doc.tag): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sergey M
					Sergey M