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
[GetCourseRuIE] & [AcademyMel] Add extractor #8873
Conversation
I successfully built the binaries on my fork and tested them with a URL (since it's changing probably like once a day, posting it here won't help): https://github.com/divStar/yt-dlp/actions/runs/7360557969. I am still looking into possibly creating some account on the source website ( |
The This is why I am about to add a Once the tests pass, this PR should now be mergable. |
Review remarks / TODOs:
I am working on these things. |
Please note that there are hidden suggestions |
@seproDev has pointed out the following plan to complete this:
|
…as successfully tested (with proper credentials)
Web interface allows both to be set independently
The site sends this. Seems like a csrf value. Even though it is unchecked, better to send it imo.
Some pages exist that can be accessed without logging in
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
…ixed an ID in test
I successfully ran all the test cases in the So overall this looks good to me. Thank you everyone for your help and support! It was an awesome experience! |
Just reporting back: tried this extractors on multiple occasions and multiple sites successfully (both: |
Authored by: divStar, seproDev Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
This PR contains 2 extractors:
GetCourseRuPlayerIE
forplayer\d{2,}.getcourse.ru
- a CDN, hosting various videosGetCourseRuIE
for*.getcourse.ru
(exceptplayer\d{2,}
)GetCourseRuPlayerIE
The key feature of this extractor is to extract the
masterPlaylistUrl
from a HTML/JavaScript response, which usually is injected into a website. This URL is then passed to theGeneric
extractor.This extractor also has an
_EMBED_REGEX
, which allows theGeneric
extractor to make use of it if a suitable URL is encountered in a given page.GetCourseRuIE
The key feature here is, that - given proper credentials - this extractor retrieves the
iframe
tags with particularsrc
attribute values, passes each of the results into theGetCourseRuPlayerIE
extractor and collects the results in a playlist.Since most sub-domains on
*.getcourse.ru
work the same way (aside from IDs), this generalized extractor should be able to extract videos from most of the websites ongetcourse.ru
- given the proper credentials.Further more this extractor contains a curated list of
_DOMAINS
, that are defacto-aliases to theirgetcourse.ru
-sub-domains.Misc
Example of the response when using the URL above with a valid
s
andjson
query parameterOne way to acquire such an URL is to register at
https://academymel.online/3video_2
and login. It gives you a couple of cookies when you log in and then that website'siframe
tags will havesrc
attributes, which are URLs to thegetcourse.ru
domain and contain the currentvideo_hash
(it changes probably once every day) and auser_id
- all embedded in thejson
ands
query parameters.Since getting the
....getcourse.ru/sign-player/?...
URLs is easy once you're logged in, I did not bother to go foracademymel.online
itself (also the pages on there could contain multiple videos). Also this system is likely to work for quite a few videos hosted ongetcourse.ru
, becausegetcourse.ru
is a "build blocks" website for courses and thus abstracts video players and the likes away for its customers.I have included a valid ID and URL, but they might not be valid at the point of review.
.netrc
This extractor allows the user to supply a
username
and apassword
or use--netrc
flag. If the user chooses to use the latter, the user can have a.netrc
file in e.g. his/her home directory. However: instead of just resorting tomachine getcourseru
(which is still necessary, albeit with dummy values - these are never used), the user can specify individual domains to use.Example .netrc file contents
This allows the user to enter all his/her credentials in order to easily be able to download all desired videos.
Template
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:
What is the purpose of your pull request?