fix (workaround) not well-formed xml error #5421
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This command: youtube-dl http://www.stern.de/wissen/natur/anhaengliches-reptil-wasserschildkroete-rueckt-taucher-nicht-von-der-pelle-2186820.html
errors out with:
[...]
File "C:\dev\Anaconda3\lib\site-packages\youtube_dl-2015.4.9-py3.4.egg\youtube_dl\extractor\generic.py", line 933, in _real_extract
bc_urls = BrightcoveIE._extract_brightcove_urls(webpage)
File "C:\dev\Anaconda3\lib\site-packages\youtube_dl-2015.4.9-py3.4.egg\youtube_dl\extractor\brightcove.py", line 188, in _extract_brightcove_urls
return [cls._build_brighcove_url(m) for m in matches]
File "C:\dev\Anaconda3\lib\site-packages\youtube_dl-2015.4.9-py3.4.egg\youtube_dl\extractor\brightcove.py", line 188, in
return [cls._build_brighcove_url(m) for m in matches]
File "C:\dev\Anaconda3\lib\site-packages\youtube_dl-2015.4.9-py3.4.egg\youtube_dl\extractor\brightcove.py", line 120, in _build_brighcove_url
object_doc = xml.etree.ElementTree.fromstring(object_str.encode('utf-8'))
File "C:\dev\Anaconda3\lib\xml\etree\ElementTree.py", line 1325, in XML
parser.feed(text)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 26, column 41
This PR "fixes" this error and allows to download the video.