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

Fix 10Play #31892

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Fix 10Play #31892

wants to merge 6 commits into from

Conversation

gormster
Copy link

@gormster gormster commented Mar 21, 2023

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 youtube-dl 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

This PR does two things for the 10Play extractor:

  1. Fixes an issue where almost all videos now require authentication (authentication was not previously supported at all)
  2. Adds the ability to download an entire season as a playlist

After searching the PRs it seems like @aarubui created a patch for the first issue in #28728 but withdrew it for unspecified reasons. So here's another working version, and this time it does playlists, too!

Edit:

@gormster
Copy link
Author

oh, btw - I wasn't sure how to write tests that require authentication. I've just set the parameter to use netrc; I feel like that's not ideal, but as I mentioned in the PR, there's almost no videos that don't require authentication. The only one I could find was football match highlights, but they don't stick around for very long.

@Vangelis66
Copy link

... Thanks for your efforts 😄 ; back in Sep of last year, I took part in the discussion of related #31236, where the current maintainer (@dirkf) posted a yet unmerged patch to the tenplay.py IE here; I'm not a coder myself 😜 , but feel free to compare the code inside that patch (which worked OK for a single episode back then, when "I" tested it) ...

You might also want to mark your PR as, hopefully, "fixing" open issues #28641, #31236 (main one) and #31302 ...

Regards 😃

@Vangelis66
Copy link

... Also, youtube-dl retains support for py2.6/2.7 and py3.2+, so your code should really be tested and made compatible with those environments...

I downloaded locally the tenplay.py file in its current iteration inside your PR and then attempted to "optimise" it with a local py3.4.10 install; py3.4 complained that 😞 :

  File "tenplay.py", line 91
    f'https://10play.com.au/api/shows/{show}/episodes/{season}', f"{show}/{season}",
                                                              ^
SyntaxError: invalid syntax

... f-strings were first introduced in py3.6 😉 ...

* back-port PR
* improve geo-block detection
@dirkf
Copy link
Contributor

dirkf commented Sep 11, 2024

With apologies to @gormster, I've updated this PR with changes including the latest update from yt-dlp/yt-dlp/pull/10928.

Since I only get geo-blocking I've also been able to improve that area over the yt-dlp code. But now the actual extraction needs to be tested by users in the AU region, please.

The proper way to do this is to check out this branch and run the program from the youtube-dl directory of the checked-out branch using python -m youtube_dl as the youtube-dl command (with python being whatever you type to run python, probably python3).

A user who is able/happy to patch the changed tenplay.py (this only works for certain installation types and is generally not recommended) can check out the updated TenPlayIE extractor. To try the TenPlaySeasonIE season/series extractor, extractors.py has to be updated too.

In either case please comment out the lines like this

        'skip': 'Only available in Australia',

in the test cases, run the tests and post the results.

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.

youtube-dl thinks there is no "host" at TenPlay 10play.com.au not downloading
3 participants