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

[extractor/cbc] Workaround CBC returning a http 426 when querying file data #6781

Merged
merged 3 commits into from May 29, 2023

Conversation

jo-nike
Copy link
Contributor

@jo-nike jo-nike commented Apr 11, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Walkaround CBC.ca returning a return code of 426 when querying the file data.

curl -v https://services.radio-canada.ca/ott/cbc-api/v2/assets/murdoch-mysteries/s11e08
*   Trying 23.78.210.233:443...
* TCP_NODELAY set
* Connected to services.radio-canada.ca (23.78.210.233) port 443 (#0)
* {truncated for pertinence}
* Mark bundle as not supporting multiuse
< HTTP/1.1 426 Upgrade Required
< {truncated for pertinence}
<
{"id":"murdoch-mysteries/s11e08","title":"Brackenreid Boudoir","description":"To investigate an artist’s murder, Brackenreid picks up his paintbrush again and attracts a wealthy patron’s very personal attention.","image":"https://images.radio-canada.ca/v1/synps-cbc/episode/perso/cbc_murdoch_mysteries_season_11e08_thumbnail_v01.jpeg?impolicy=ott&im=Resize=(_Size_)&quality=75","series":"Murdoch Mysteries","season":11,"episode":8,"isTrailer":false,"duration":2652,"contentTier":"MEMBER","playSession":{"url":"https://services.radio-canada.ca/media/validation/v2?appCode=gem&idMedia=164817&manifestType=desktop&output=json&tech=hls","mediaId":"164817"},"rating":"PG","category":"crime-and-police","availableDate":1537830000000,"airDate":1512345600000,"showId":"murdoch-mysteries","appleContentId":"CBC_MURDOCH_MYSTERIES_SEASON_11_S11E08","credits":{},"chainplay":{"id":"murdoch-mysteries/s11e09","cuepoint":2621,"title":"The Talking Dead","description":"After obituaries are published in advance of two men’s deaths, Murdoch discovers more intended victims - including a member of Station House No. 4 - that he must keep alive before their predicted demise.","season":11,"episode":9,"image":"https://images.radio-canada.ca/v1/synps-cbc/episode/perso/cbc_murdoch_mysteries_season_11e09_thumbnail_v01.jpeg?impolicy=ott&im=Resize=(_Size_)&quality=75"},"adParameters":{"adUnit":"5876/entertainment/shows/murdochmysteries","adUrl":"https://pubads.g.doubleclick.net/gampad/ads?description_url=https%3a%2f%2fgem.cbc.ca%2fmurdoch-mysteries%2fs11e08&pp=web-app&scp=bu%3dgem&env=vp&gdfp_req=1&unviewed_position_start=1&correlator=1363087&output=xml_vast&iu=5876%2fentertainment%2fshows%2fmurdochmysteries&sz=320x240&vid=164817&url=https%3a%2f%2fgem.cbc.ca%2fmurdoch-mysteries%2fs11e08&cust_params=plat%3dott%26client%3dweb-app%26ut%3dano&ad_rule=1&ciu_szs=300x250&cmsid=2556398&hl=en&label=viewable_impression&nofb=2","hasAds":true,"restrictsAds":false,"mandatoryAdsForAllUsers":false},"amplitudeAnalytics":{"id":"murdoch-mysteries/s11e08","title":"bra* Connection #0 to host services.radio-canada.ca left intact
ckenreid-boudoir","series":"murdoch-mysteries","season":"s11","episode":"e08","duration":2652,"bookmark":null,"contentTier":"member"},"comscoreAnalytics":{"title":"brackenreid-boudoir","series":"murdoch-mysteries","season":11,"episode":8,"rating":"pg","duration":2652,"id":"murdoch-mysteries/s11e08","keyword":"crime-and-police"},"isCompleted":false}```

Fixes #6716

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

@jo-nike jo-nike changed the title 6716 cbc http 426 [extractor/cbc] Workaround CBC returning a http 426 when querying file data Apr 11, 2023
yt_dlp/extractor/cbc.py Outdated Show resolved Hide resolved
@pukkandan pukkandan added the site-bug Issue with a specific website label Apr 11, 2023
@pukkandan pukkandan force-pushed the master branch 2 times, most recently from ee280c7 to 7aeda6c Compare May 24, 2023 18:09
@pukkandan pukkandan merged commit 4afb208 into yt-dlp:master May 29, 2023
11 checks passed
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTPError 426: 'Upgrade Required' when downloading from CBC
2 participants