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 iPlayer] Unable to download XML #16005

Open
oneplusme opened this issue Mar 27, 2018 · 1 comment
Open

[BBC iPlayer] Unable to download XML #16005

oneplusme opened this issue Mar 27, 2018 · 1 comment

Comments

@oneplusme
Copy link
Contributor

@oneplusme oneplusme commented Mar 27, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.03.26.1. 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.03.26.1

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)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

./youtube-dl -v --print-traffic --cookies=new.cookies -F https://www.bbc.co.uk/iplayer/episode/b094f5h4

**stdout**
[bbc.co.uk] b094f5h4: Downloading video page
[bbc.co.uk] b094f5h4: Downloading playlist JSON
send: b'GET /iplayer/episode/b094f5h4 HTTP/1.1\r\nHost: www.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 301 Moved Permanently\r\n'
header: request-id header: X-Cache-Action header: Vary header: X-Cache-Age header: Cache-Control header: Content-Type header: Date header: server-timing header: location header: x-xss-protection header: x-content-type-options header: x-response-time header: Connection header: x-frame-options header: Content-Length
send: b'GET /iplayer/episode/b094f5h4/oran-na-marasong-of-the-sea HTTP/1.1\r\nHost: www.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: request-id header: X-Cache-Action header: Vary header: X-Cache-Age header: Cache-Control header: Content-Type header: content-encoding header: Date header: server-timing header: link header: x-xss-protection header: etag header: x-content-type-options header: x-response-time header: Connection header: Set-Cookie header: x-frame-options header: Content-Length
[bbc.co.uk] b094f5h4: Downloading legacy playlist XML
send: b'GET /programmes/b094f5h4/playlist.json HTTP/1.1\r\nHost: www.bbc.co.uk\r\nCookie: BBC-UID=955a0b6a577b3e3c9895b926b1ee8a1f75e69691a7b4c4061ab0774234b4e7a00Mozilla/5.0%20(X11%3b%20Linux%20x86_64%3b%20rv:59.0)%20Gecko/20100101%20Firefox/59.0%20(Chrome)\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server header: X-Cache-Action header: Vary header: Cache-Control header: X-Cache-Age header: Content-Type header: Content-Encoding header: Date header: Content-Language header: Access-Control-Allow-Origin header: Etag header: Connection header: X-UA-Compatible header: Access-Control-Allow-Headers header: Content-Length
send: b'GET /iplayer/playlist/b094f5h4 HTTP/1.1\r\nHost: www.bbc.co.uk\r\nCookie: BBC-UID=955a0b6a577b3e3c9895b926b1ee8a1f75e69691a7b4c4061ab0774234b4e7a00Mozilla/5.0%20(X11%3b%20Linux%20x86_64%3b%20rv:59.0)%20Gecko/20100101%20Firefox/59.0%20(Chrome)\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 404 Not Found\r\n'
header: Content-Type header: Date header: Connection header: Content-Length 

**stderr**
[debug] System config: []
[debug] User config: ['--cookies', '/home/userid/.youtube-dl.cookies']
[debug] Custom config: []
[debug] Command-line args: ['-v', '--print-traffic', '--cookies=new.cookies', '-F', 'https://www.bbc.co.uk/iplayer/episode/b094f5h4']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.26.1
[debug] Python version 3.6.4 (CPython) - Linux-4.15.12-x86_64-Intel-R-_Core-TM-_i5-4570T_CPU_@_2.90GHz-with-gentoo-2.4.1
[debug] exe versions: ffmpeg 3.4.2, ffprobe 3.4.2, rtmpdump 2.4
[debug] Proxy map: {}
ERROR: Unable to download XML: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); 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 complete output.
  File "./youtube-dl/youtube_dl/extractor/common.py", line 519, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2199, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)


...
<end of log>

Description of your issue, suggested solution and other information

youtube-dl fails against https://www.bbc.co.uk/iplayer/episode/b094f5h4 with a 404 error from the "Downloading legacy playlist XML" stage.

@Ballz2k7
Copy link

@Ballz2k7 Ballz2k7 commented Jul 9, 2018

I have the same issue with the latest version on both windows and linux. If I give it a URL that contains a page with all the episodes of a box set it errors out with an xml error.
As a work around I wrote a simple python script that uses PhantomJS and a regex to strip the url's for me, then I pipe those into youtube-dl.

urls = re.findall('"href":"(/iplayer/episode/.*?)"', driver.page_source)

Then I just write out the list appending https://www.bbc.co.uk before the links found.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.