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

[ceskatelevize] Update to 2021-12-06 changes (#1899) #1904

Merged
merged 3 commits into from
Dec 7, 2021

Conversation

mkubecek
Copy link
Contributor

@mkubecek mkubecek commented Dec 6, 2021

After a site redesign on 2021-12-06, player iframe is no longer present in
the page from the start and is only inserted after pressing the "play"
button. We need to query /v-api/iframe-hash/ to get hash to pass to
iFramePlayer.php and extract "IDEC" id from a json in the original page.

Please follow the guide below

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

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 one of the following options:

  • 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?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Fix downloading from www.ceskatelevize.cz after website redesign of 2012-06-12.

After a site redesign on 2021-12-06, player iframe is no longer present in
the page from the start and is only inserted after pressing the "play"
button. We need to query /v-api/iframe-hash/ to get hash to pass to
iFramePlayer.php and extract "IDEC" id from a json in the original page.
yt_dlp/extractor/ceskatelevize.py Outdated Show resolved Hide resolved
yt_dlp/extractor/ceskatelevize.py Outdated Show resolved Hide resolved
yt_dlp/extractor/ceskatelevize.py Outdated Show resolved Hide resolved
@pukkandan pukkandan added site-bug Issue with a specific website pending-fixes PR has had changes requested labels Dec 7, 2021
- use _search_nextjs_data() helper
- use traverse_obj() nested syntax
- better name for variable with iframe hash
- do not use variables for URLs used only once
@pukkandan pukkandan removed the pending-fixes PR has had changes requested label Dec 7, 2021
@pukkandan pukkandan merged commit 443b21d into yt-dlp:master Dec 7, 2021
@dirkf
Copy link
Contributor

dirkf commented Dec 20, 2021

With 2021-12-20 master, extractor test 0 fails (RegexNotFoundError: [CeskaTelevize] 20641-bonus-01-en: Unable to extract type) and the metadata extraction fails in test 2 (Invalid value for field title, expected 'Queer: Bogotart', got 'Bogotart - Queer | Česká televize').

There has been another commit after this PR but it shouldn't have caused those failures.

@mkubecek
Copy link
Contributor Author

With 2021-12-20 master, extractor test 0 fails (RegexNotFoundError: [CeskaTelevize] 20641-bonus-01-en: Unable to extract type) and the metadata extraction fails in test 2 (Invalid value for field title, expected 'Queer: Bogotart', got 'Bogotart - Queer | Česká televize').

Seems to work here. Any chance you are hitting #2043?

@dirkf
Copy link
Contributor

dirkf commented Dec 20, 2021

Satisfyingly, or not, I have a similar result (test 0) with my back-port to yt-dl, which led me to check the tests in yt-dlp.

In the browser with JS disabled, getPlaylistUrl, which is necessary for either of the attempts to get type, doesn't appear in the page: maybe it's been punted into some JS import.

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.

3 participants