Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bbc.co.uk] Failed to parse XML #17492

Open
5 tasks done
darthhaggis opened this issue Sep 8, 2018 · 4 comments
Open
5 tasks done

[bbc.co.uk] Failed to parse XML #17492

darthhaggis opened this issue Sep 8, 2018 · 4 comments

Comments

@darthhaggis
Copy link

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.09.08. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.09.08

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


D:\Video\Downloads>youtube-dl https://www.bbc.co.uk/iplayer/episode/b063cph3/ -v
[debug] System config: []
[debug] User config: ['--sub-format', 'srt', '--convert-subs', 'srt', '--embed-s
ubs', '--merge-output-format', 'mkv', '--recode-video', 'mkv', '--format', 'best
video[width=1280]+bestaudio/best', '-o', 'D:/Video/Downloads/%(series)s/%(series
)s - %(season_number)sx%(episode_number)02d - %(title)s [%(height)s] [%(id)s].%(
ext)s', '--prefer-ffmpeg', '--ffmpeg-location', 'D:\\Video\\FFMPEG\\bin', '--dow
nload-archive', 'D:/Video/Downloads/Archive.txt', '--exec', 'D:\\Video\\FFMPEG\\
bin\\ffmpeg.exe -i {} -map 0 {}_+.mkv']
[debug] Custom config: []
[debug] Command-line args: ['https://www.bbc.co.uk/iplayer/episode/b063cph3/', '
-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.09.08
[debug] Python version 3.4.4 (CPython) - Windows-8.1-6.3.9600
[debug] exe versions: ffmpeg N-90771-g5079e96bcc, ffprobe N-90771-g5079e96bcc
[debug] Proxy map: {}
[bbc.co.uk] b063cph3: Downloading video page
[bbc.co.uk] b063cph3: Downloading playlist JSON
[bbc.co.uk] b063cpgv: Downloading media selection XML
ERROR: b063cpgv: Failed to parse XML  (caused by ParseError('syntax error: line
1, column 49',)); please report this issue on https://yt-dl.org/bug . Make sure
you are using the latest version; type  youtube-dl -U  to update. Be sure to cal
l youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\common.py", line 816, in _parse_xml
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\compat.py", line 2513, in compat_etree_fromstring
  File "C:\Python\Python34\lib\xml\etree\ElementTree.py", line 1335, in XML
  File "<string>", line None
xml.etree.ElementTree.ParseError: syntax error: line 1, column 49
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\common.py", line 816, in _parse_xml
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\compat.py", line 2513, in compat_etree_fromstring
  File "C:\Python\Python34\lib\xml\etree\ElementTree.py", line 1335, in XML
  File "<string>", line None
xml.etree.ElementTree.ParseError: syntax error: line 1, column 49

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\YoutubeDL.py", line 792, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\common.py", line 502, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\bbc.py", line 567, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\bbc.py", line 463, in _download_playlist
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\bbc.py", line 333, in _download_media_selector
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\bbc.py", line 344, in _download_media_selector_url
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\common.py", line 809, in _download_xml
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\common.py", line 793, in _download_xml_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpork090uw\bu
ild\youtube_dl\extractor\common.py", line 820, in _parse_xml
youtube_dl.utils.ExtractorError: b063cpgv: Failed to parse XML  (caused by Parse
Error('syntax error: line 1, column 49',)); please report this issue on https://
yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U
 to update. Be sure to call youtube-dl with the --verbose flag and include its c
omplete output.

<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):


Description of your issue, suggested solution and other information

Video that plays normally in browser fails to get the XML file information for download. This is a recent issue that only started occurring after several other videos downloaded successfully from the same site.

@darthhaggis darthhaggis changed the title Failed to parse XML [bbc.co.uk] Failed to parse XML Sep 8, 2018
@konrad-gibaszewski
Copy link

I had the same problem with youtube-dl 2018.10.05. Running youtube-dl --rm-cache-dir and retrying a download fixed the problem.

@Cj-Malone
Copy link

I'm experiencing the same on 2019.02.08, clearing the cache doesn't effect it.

It seems to be to do with subtitles youtube-dl https://www.bbc.co.uk/programmes/p008wlzl works fine, but youtube-dl https://www.bbc.co.uk/programmes/p008wlzl --write-sub doesn't.

@Echtze1t
Copy link

Echtze1t commented Jun 4, 2019

The donwload worked fine yesterday, but when I woke up it had failed and could not be restarted. Clearing the cache has no effect.

C:\temp\mpv>youtube-dl https://www.bbc.co.uk/iplayer/episode/b00s0ch0/extras-ser
ies-1-episode-2 --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.bbc.co.uk/iplayer/episode/b00s0ch0/extr
as-series-1-episode-2', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2019.05.20
[debug] Python version 3.4.4 (CPython) - Windows-8.1-6.3.9600
[debug] exe versions: ffmpeg N-93955-g415886588f, ffprobe N-93955-g415886588f, r
tmpdump 2.4
[debug] Proxy map: {}
[bbc.co.uk] b00s0ch0: Downloading video page
[bbc.co.uk] b00s0ch0: Downloading playlist JSON
[bbc.co.uk] b00s0b9m: Downloading media selection XML
ERROR: b00s0b9m: Failed to parse XML (caused by ParseError('not well-formed (in
valid token): line 1, column 49',)); please report this issue on https://yt-dl.o
rg/bug . Make sure you are using the latest version; type youtube-dl -U to upd
ate. Be sure to call youtube-dl with the --verbose flag and include its complete
output.
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\common.py", line 848, in _parse_xml
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\compat.py", line 2522, in compat_etree_fromstring
File "C:\Python\Python34\lib\xml\etree\ElementTree.py", line 1335, in XML
File "", line None
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, colum
n 49
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\common.py", line 848, in _parse_xml
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\compat.py", line 2522, in compat_etree_fromstring
File "C:\Python\Python34\lib\xml\etree\ElementTree.py", line 1335, in XML
File "", line None
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, colum
n 49

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\YoutubeDL.py", line 796, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\common.py", line 529, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\bbc.py", line 575, in _real_extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\bbc.py", line 471, in _download_playlist
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\bbc.py", line 341, in _download_media_selector
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\bbc.py", line 352, in _download_media_selector_url

File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\common.py", line 841, in _download_xml
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\common.py", line 825, in _download_xml_handle
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpt31j5y
3w\build\youtube_dl\extractor\common.py", line 852, in _parse_xml
youtube_dl.utils.ExtractorError: b00s0b9m: Failed to parse XML (caused by Parse
Error('not well-formed (invalid token): line 1, column 49',)); please report thi
s issue on https://yt-dl.org/bug . Make sure you are using the latest version; t
ype youtube-dl -U to update. Be sure to call youtube-dl with the --verbose fla
g and include its complete output.

@dirkf
Copy link
Contributor

dirkf commented Mar 24, 2021

The quoted URL https://www.bbc.co.uk/iplayer/episode/b063cph3/ now leads to a Peter Rabbit show page. Any playlists that might have been associated with the PID in the URL no longer exist.

The reported issue is no longer seen, but equally no videos are found.

Arguably the extractor should redirect to the new page, process it and extract the videos with prefix https://www.bbc.co.uk/cbeebies/watch/. These can easily be supported by adding another PID matcher r'"vpid"\s*:\s*"(%s)"' % self._ID_REGEX to the BBCIE extractor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants