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

[cbc.ca] Error 402: Payment Required #16764

Open
darthhaggis opened this issue Jun 19, 2018 · 9 comments
Open

[cbc.ca] Error 402: Payment Required #16764

darthhaggis opened this issue Jun 19, 2018 · 9 comments

Comments

@darthhaggis
Copy link

@darthhaggis darthhaggis commented Jun 19, 2018

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

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:

[debug] System config: []
[debug] User config: ['--all-subs', '--sub-format', 'srt', '--convert-subs', 'srt', '--embed-subs', '--merge-output-format', 'mkv', '--recode-video', 'mkv', '--format', 'bestvideo[width<=?1280]+bestaudio/best', '-o', 'D:/Video/Downloads/%(series)s/%(series)s - %(season_number)sx%(episode_number)02d - %(title)s [%(height)s].%(ext)s', '--prefer-ffmpeg', '--ffmpeg-location', 'D:\\Video\\FFMPEG\\bin', '--download-archive', 'D:/Video/Downloads/Archive.txt']
[debug] Custom config: []
[debug] Command-line args: ['https://watch.cbc.ca/media/heartland/season-9/episode-7/38e815a-0094c1b411a', '--username', 'PRIVATE', '-v']
Type account password and press [Return]:
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.06.18
[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: {}
[debug] Using fake IP 99.239.129.198 (CA) as X-Forwarded-For.
[cbc.ca:watch] 38e815a-0094c1b411a: Downloading XML
[cbc.ca:watch] 38e815a-0094c1b411a: Downloading XML
[download] Downloading playlist: Fearless
[cbc.ca:watch] playlist Fearless: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[debug] Using fake IP 99.234.54.159 (CA) as X-Forwarded-For.
[cbc.ca:watch:video] c78f815d-d3ed-4502-871f-da9347e0318a: Downloading XML
ERROR: Unable to download XML: HTTP Error 402: Payment Required (caused by HTTPError()); 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 "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpu1zifx01\build\youtube_dl\extractor\common.py", line 579, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpu1zifx01\build\youtube_dl\YoutubeDL.py", line 2211, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default

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):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Unlike Error 402 for Youtube which typically signifies too many requests, a restricted IP, or a CAPTCHA request, in this situation some of the videos on the site (mainly those not currently being broadcast but instead from a previous season, etc) require a free membership in order to watch them. In this situation, "Error 402: Payment Required" actually seems appropriate in that you need to be logged in to access select files. After trying multiple different options and variables, it appears that the youtube-dl interface is either not passing the login info to the page, or when logged in within the browser, the login info is not being save as a cookie that can be utilised by youtube-dl. Files that don't require logging in to view are easily downloaded.
Is there some sort of variable/option that I am missing that would circumvent the issue, or is it just not passing the credentials on to the site at the appropriate time?

@mshiels
Copy link

@mshiels mshiels commented Oct 20, 2018

Having looked at the cbc.py code - it does not user/understand a userid/password. I may be trying to update that code since I too download alot from cbc. I pretty well understand the login process, just gotta find time to code/test it.

@Triforcecwp
Copy link

@Triforcecwp Triforcecwp commented Jan 4, 2019

This is a feature i would love to see added to youtube-dl @mshiels . unfortunately i do not posses the skill required to do this myself, i guess its something I'm going to have to work towards in the future.

@remitamine remitamine changed the title Error 402: Payment Required [cbc.ca] Error 402: Payment Required Feb 5, 2019
@meunierd
Copy link
Contributor

@meunierd meunierd commented Feb 6, 2019

The token dance is facilitated partly by loginradius

Before submitting a username and password, you need an api key that I haven't been able to locate yet, but once the browser has negotiated the tokens I've been able to inject them into cbc.py and successfully downloaded login gated videos.

@meunierd meunierd mentioned this issue Feb 6, 2019
5 of 5 tasks complete
@meunierd
Copy link
Contributor

@meunierd meunierd commented Mar 12, 2019

@remitamine can I bug you to take a look at this PR ☝️ ?

@Sparktank
Copy link

@Sparktank Sparktank commented Aug 27, 2019

I'm also looking how this can be achieved. I'd love to archive Heartland for my mother, with subtitle support. Even willing to pay the $5 CDN/mo for the subscription service.
Looked through all sort of tickets. Can't understand any of them.
I live in Canada, so GEO will pick up I'm in Canada.
I also did sign up for the trial. After a month, it will get charged for the $5 CDN for CBC Premium.
Using -u and -p didn't help.

@meunierd
Copy link
Contributor

@meunierd meunierd commented Aug 27, 2019

On this branch? Did you clear cache?

@makeworld-the-better-one

@Sparktank check out #19160. It hasn't been merged yet, but it has some new code that will download from the CBC for free. Idk about subtitles though.

@meunierd
Copy link
Contributor

@meunierd meunierd commented Aug 27, 2019

I can confirm that subtitles don't work.

@Sparktank
Copy link

@Sparktank Sparktank commented Aug 27, 2019

On this branch? Did you clear cache?

i've used --rm-cache-dir which doesn't work. Also tried --no-cache-dir which also doesn't work.

I've seen that ticket but don't know where to go from there. I don't use Python. When I do, it's the latest build available in 3.x.

Is that a branch I will need to compile myself?

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.

7 participants
You can’t perform that action at this time.