From 78c2e1c978e745e0a23a5f4cc61ca9b0c0152f7a Mon Sep 17 00:00:00 2001 From: Guy Veis Date: Sun, 8 Mar 2015 15:20:58 +0200 Subject: [PATCH] Fixed parsing spaced xml files --- youtube_dl/extractor/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index f9e8e2bad..1ce16a779 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -439,7 +439,7 @@ class InfoExtractor(object): return xml_string if transform_source: xml_string = transform_source(xml_string) - return xml.etree.ElementTree.fromstring(xml_string.encode('utf-8')) + return xml.etree.ElementTree.fromstring(xml_string.encode('utf-8').strip()) def _download_json(self, url_or_request, video_id, note='Downloading JSON metadata',