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

ATV.at: fix extractor using the new jwt JSON Web Token #1012

Merged
merged 3 commits into from
Sep 23, 2021

Conversation

NeroBurner
Copy link
Contributor

@NeroBurner NeroBurner commented Sep 17, 2021

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 the ATV.at extractor as the site changed

Instead of using the external python module jwt from the python-jwt
package implement the web token creation is done following RFC7519.

The page uses a simmilar player as pro7 ans sat1, but different.

Fixes: #988

yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
@pukkandan pukkandan added the pending-fixes PR has had changes requested label Sep 18, 2021
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
@NeroBurner
Copy link
Contributor Author

NeroBurner commented Sep 19, 2021 via email

@pukkandan
Copy link
Member

pukkandan commented Sep 19, 2021

for the whole site. The download-archive works based on id.

Also, if a video can be downloaded through multiple URLs, all of them should give the same id

@NeroBurner
Copy link
Contributor Author

I've got the following in the content variable

{
  "id":          "v-ce9cgn1e70n5",
  "tvShowId":    "745842",
  "tvShowTitle": "Bauer sucht Frau",
  "seasonId":    "s-cap22abg9hs9",
  "upc":         "v-ce9cgn1e70n5",
  "splitId":     "v-ce9cgn1e70n5-1"
}

I think the splitId field would be the best match. Would the other fields be useful for other extracted attributes?

@pukkandan
Copy link
Member

pukkandan commented Sep 19, 2021

only splitId and title seem usefull. But I believe u r already getting the title

PS: and id if you dnt already have a way of extracting the playlist's id

@pukkandan pukkandan removed the pending-fixes PR has had changes requested label Sep 19, 2021
Instead of using the external python module `jwt` from the `python-jwt`
package implement the web token creation is done following RFC7519.
Add this `jwt_encode_hs256` to `utils.py`.

The page uses a simmilar player as pro7 ans sat1, but different.

Fixes: yt-dlp#988
@NeroBurner
Copy link
Contributor Author

rebased on current master and squashed commits

@Ashish0804 Ashish0804 added the pending-review PR needs a review label Sep 23, 2021
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
yt_dlp/extractor/atvat.py Outdated Show resolved Hide resolved
@pukkandan pukkandan merged commit 49fa4d9 into yt-dlp:master Sep 23, 2021
@NeroBurner NeroBurner deleted the atvat_jwt_extract branch September 23, 2021 18:28
Lesmiscore added a commit to Lesmiscore/yt-dlp that referenced this pull request Sep 24, 2021
…-from-start

* 'master' of https://github.com/yt-dlp/yt-dlp:
  [zdf] Improve format sorting Closes yt-dlp#910
  [SpankBang] Fix uploader (yt-dlp#892)
  [build] Improve release process (yt-dlp#880)
  [Arte] Improve description extraction (yt-dlp#1046)
  [Theta] Add extractor (yt-dlp#1068)
  [youtube] Cleanup authentication code (yt-dlp#786)
  [xattr] bugfix for b194045
  Separate the options `--ignore-errors` and `--no-abort-on-error`
  Ignore empty entries in `_list_from_options_callback`
  Download subtitles in order of `--sub-langs` Closes yt-dlp#1041
  [cbs] Report appropriate error for DRM Closes yt-dlp#1056
  bugfix for bd50a52
  [youtube] Fix `--mark-watched` with `--cookies-from-browser` Closes yt-dlp#1019
  [lbry] Show error message from API response
  [Koo] Add extractor (yt-dlp#1044)
  [Chingari] Add extractors (yt-dlp#1038)
  [atv.at] Use jwt for API (yt-dlp#1012)
nixxo pushed a commit to nixxo/yt-dlp that referenced this pull request Nov 22, 2021
The jwt token is implemented according to RFC7519

Closes yt-dlp#988
Authored by: NeroBurner
@bashonly bashonly removed the pending-review PR needs a review label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Broken] Atv.at
4 participants