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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ie/theatercomplextown] Add extractors #8560

Merged
merged 4 commits into from Nov 11, 2023

Conversation

bashonly
Copy link
Member

@bashonly bashonly commented Nov 10, 2023

theater-complex.town is a subscription/PPV service that streams Japanese theater productions. Its web API is identical to that of StaCommu, another Japanese subscription-based streaming service.
(The G Play store says that both sites' Android apps are developed by "CyberAgent Inc.", which is likely the same company as "CyberFight Inc." that develops the Wrestle-Universe app.)

Because of the carbon copy API, I didn't have to do much here: just moved some methods to the Stacommu baseclass and plugged in a different API key and hostname

Closes #8491

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?

Copilot Summary

馃 Generated by Copilot at f7dbeb7

Summary

馃幁馃幀鈾伙笍

Refactor and add extractors for stacommu and theater-complex.town. The change improves the code structure and reusability of the stacommu extractors and adds support for a new site that offers theater streaming. The change affects the files yt_dlp/extractor/stacommu.py, yt_dlp/extractor/theatercomplextown.py, and yt_dlp/extractor/_extractors.py.

Oh we are the coders of yt-dlp
We scrape the sites for video clips
We add new extractors to the list
And refactor the old ones with a twist

Walkthrough

  • Add support for theater-complex.town, a Japanese platform for streaming theater performances, by creating two new extractor classes: TheaterComplexTownVODIE for video on demand content and TheaterComplexTownPPVIE for pay-per-view content (link)
  • Move the base class StacommuBaseIE from yt_dlp/extractor/stacommu.py to yt_dlp/extractor/_extractors.py to avoid circular imports and enable inheritance by the new classes (link)
  • Simplify the extraction of video on demand content from stacommu.jp by calling the _extract_vod method of StacommuBaseIE in the _real_extract method of StacommuVODIE (link)
  • Simplify the extraction of pay-per-view content from stacommu.jp by calling the _extract_ppv method of StacommuBaseIE in the _real_extract method of StacommuLiveIE (link)

@bashonly bashonly added the site-request Request to support a new website label Nov 10, 2023
bashonly and others added 2 commits November 10, 2023 18:09
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
@bashonly bashonly added pending-review PR needs a review and removed pending-review PR needs a review labels Nov 11, 2023
@bashonly bashonly self-assigned this Nov 11, 2023
@bashonly bashonly merged commit 2863fcf into yt-dlp:master Nov 11, 2023
16 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-request Request to support a new website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Theater Complex Town
2 participants