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

Fixed tubitv extractor #9975

Merged
merged 8 commits into from
May 29, 2024
Merged

Fixed tubitv extractor #9975

merged 8 commits into from
May 29, 2024

Conversation

chilinux
Copy link
Contributor

@chilinux chilinux commented May 20, 2024

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Fixes the tubitv extractor. Previously the metadata was provided directly as json at it's own url. The website has since been revised such that this json data is embedded in the webpage itself.

Fixes #9937

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?

Signed-off-by: Ben Galliart <bgallia@gmail.com>
Signed-off-by: Ben Galliart <bgallia@gmail.com>
@seproDev seproDev added the site-bug Issue with a specific website label May 20, 2024
@chilinux
Copy link
Contributor Author

Fixes #9937

@bashonly
Copy link
Member

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

who is?

@chilinux
Copy link
Contributor Author

This is a patch to existing yt-dlp code. The majority of the file I don't own. Of the approx. 20 lines I add, most are largely based lines already there. I didn't consider anything in the pull request to be deserving of being a new "copyrighted" work that I would own. The patch is derivative and not deserving of being considered transformative. I think all the credit still belongs with the author that came before me.

If you need me to claim the code is "my own" then I will. The only source of inspiration was the code already available to me from the project. I am fine with releasing all claim that I might have to the code to be consistent with the yt-dlp license.

@bashonly
Copy link
Member

bashonly commented May 21, 2024

You are vouching for authorship of the patch, not the code you didn't add/change/remove.

The pre-existing code is already licensed under Unlicense and is not the issue.

@chilinux
Copy link
Contributor Author

I authored the derivations of the code to produce the patch. No one else has a valid calm to authorship of this patch.

@bashonly
Copy link
Member

Great, please fill out the PR template accordingly -- this is necessary for licensing reasons

@chilinux
Copy link
Contributor Author

PR template is now updated. Sorry about my confusion regarding my understanding of "original author."

Copy link
Member

@bashonly bashonly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jules-A would you mind testing this?

@bashonly bashonly added the needs-testing Patch needs testing label May 28, 2024
@bashonly bashonly self-assigned this May 28, 2024
@Jules-A
Copy link
Contributor

Jules-A commented May 29, 2024

@Jules-A would you mind testing this?

Has major issues: Only finds 20 entries, only got 404s when it tried to download.

[TubiTvShow] Playlist yu-gi-oh-vrains: Downloading 20 items of 20
[download] Downloading item 1 of 20
[TubiTv] Extracting URL: tubitv:646817
[TubiTv] 646817: Downloading webpage
ERROR: [TubiTv] 646817: Unable to download webpage: HTTP Error 404: Not Found (caused by <HTTPError 404: Not Found>)

The switch away from using the API seems like a weird thing to do, the webpage only loads 20 entries at once.

Idk if it's helpful but this is the userscript I made a while ago to list all the episodes for extraction since there's no TubiTV playlist extractor: https://pastebin.com/raw/qVKtcYNT (very messy since I was too lazy) . Still seems to extract the ids just fine for all seasons from browser.

@bashonly
Copy link
Member

The switch away from using the API seems like a weird thing to do, the webpage only loads 20 entries at once.

The series/show extractor was not touched by this PR. It has always extracted from the webpages. I was asking if you could test the video extractor

@Jules-A
Copy link
Contributor

Jules-A commented May 29, 2024

The switch away from using the API seems like a weird thing to do, the webpage only loads 20 entries at once.

The series/show extractor was not touched by this PR. It has always extracted from the webpages. I was asking if you could test the video extractor

It removes /oz/ ? Which is the API.

@bashonly
Copy link
Member

The video extractor removed the API and migrated to web. But the ShowIE has always used the webpage. Look at the code for the series extractor; it is unchanged

Authored by: bashonly
@bashonly
Copy link
Member

The ShowIE is not the subject of this PR and thus will not be fixed in this PR. But I will push something so it at least doesn't give 404s

@Jules-A
Copy link
Contributor

Jules-A commented May 29, 2024

The video extractor removed the API and migrated to web. But the ShowIE has always used the webpage. Look at the code for the series extractor; it is unchanged

Oh whoops, right, my bad. Yeah the playlist extractor never worked anyway and extracting a single show seems to be working fine in some quick tests. Sorry I'm very tired right now.

@bashonly bashonly removed the needs-testing Patch needs testing label May 29, 2024
@bashonly
Copy link
Member

@Jules-A all good, thank you for testing

Authored by: bashonly
@bashonly bashonly merged commit bef9a9e into yt-dlp:master May 29, 2024
6 checks passed
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.

[TubiTV] Unable to download JSON metadata: HTTP Error 401: Unauthorized
4 participants