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

[Pandora.tv] extracts but HTTPError: HTTP Error 404: Not Found #11023

Closed
TMoneyZ opened this issue Oct 25, 2016 · 1 comment
Closed

[Pandora.tv] extracts but HTTPError: HTTP Error 404: Not Found #11023

TMoneyZ opened this issue Oct 25, 2016 · 1 comment
Labels

Comments

@TMoneyZ
Copy link

@TMoneyZ TMoneyZ commented Oct 25, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

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

  • [x ] I've verified and I assure that I'm running youtube-dl 2016.10.25

Before submitting an issue make sure you have:

  • [x ] At least skimmed through README and most notably FAQ and BUGS sections
  • [x ] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • [x ] 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

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


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 -v flag to your command line you run youtube-dl with, 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 'http://jp.channel.pandora.tv/channel/video.ptv?ch_userid=monako5&prgid=54293799'
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://jp.channel.pandora.tv/channel/video.ptv?ch_userid=monako5&prgid=54293799']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.10.25
[debug] Python version 2.7.3 - Linux-3.18.14-v7+-armv7l-with-debian-7.8
[debug] exe versions: avconv 9.14-6, avprobe 9.14-6
[debug] Proxy map: {}
[pandora.tv] 54293799: Downloading JSON metadata
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
[debug] Invoking downloader on u'http://trans-idx.pandora.tv/apple.pandora.tv/hd/_user/m/o/monako5/99/201610250240282097o6euyxtosc3f.flv?key1=35304537394531323531394431304132353531304631364245424332&key2=92221D846BAC21109355F6B7645DE5&ft=FC&class=normal&country=US&pcode2=55512&px-bps=15253504&px-bufahead=10&cms=1'
ERROR: unable to download video data: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1699, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1641, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 353, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 61, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2001, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 407, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 445, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
...
<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):

http://jp.channel.pandora.tv/channel/video.ptv?ch_userid=monako5&prgid=54293799

Description of your issue, suggested solution and other information

Attempted to download link from Pandora.tv in quotes, downloader was invoked but 404 Error.
Can download by directly going to site, using developer tools to extract flv link

@yan12125 yan12125 added the broken-IE label Oct 28, 2016
@Serkora Serkora mentioned this issue Dec 6, 2016
4 of 5 tasks complete
@Serkora
Copy link
Contributor

@Serkora Serkora commented Dec 6, 2016

Unless other people somehow have this working for them, this is because of the changes on the website. Some backstory for anyone interested, and a pr with a fix for everyone else. #11377

I have not used youtube-dl for this website ever, so the word "change" is only based on the current link that youtube-dl is trying to use. And have only started to look into how to download from pandora a couple of days ago.

Anyway, what I have found is that to download the file, the link must have the correct px-time and px-hash queries (in fact, everything else can be omitted, http://cdn.blabla.pandora.tv/sd/_user/blabla.flv?px-time=1481026469&px-hash=47f0a1a3e1b69161f3e7d92d29dcebb5 is enough).

How the hash is generated I, unfortunately, was not able to find on the desktop version, only that it definitely does not depend on the ch_userid and prgid, only px-time (which, in turn, depends on the runtime, but can be found as nExpiration in the desktop version of the info json), fid and probably something else (same vodUrl in the video info leads to the same px-hash, provided it was requested at the same time, fun times testing that).

However, noticing that youtube-dl uses mobile version instead, I looked into that and found that, well, it simply asks the server for the hash (POSTing the vodurl, runtime and, strangely, prgid)!

@dstftw dstftw closed this in 7441915 Dec 7, 2016
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.