-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 Hidive - Subtitles and Age-restriction. #5828
Conversation
yt_dlp/extractor/hidive.py
Outdated
|
||
for cc_file in rendition.get('ccFiles', []): | ||
cc_url = url_or_none(try_get(cc_file, lambda x: x[2])) | ||
# name is used since we cant distinguish subs with same language code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls explain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the encouragement to look into that!
I improved the comments in the new commit I made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was asking to explain it to me - coz I don't understand this code/comment. You shouldn't use long name as language code. subtitles have a separate name
field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With it as-is, here's what --list-subs shows:
Language Formats
english-caps vtt
english-subs vtt
I have removed that comment in the latest version of this file -- it didn't make sense to me, either. Instead, I listed out example values in that data structure.
Do you still want me to make any changes here? This comment is on an outdated version.
@pukkandan Thank you for your code review! I'm not familiar with Python, so I apologize for the dumb mistakes I made. I'll get around to fixing them sometime soon. |
@pukkandan Your suggestions were excellent -- thanks for the code review! I learned a lot about Python while investigating and making those improvements. |
Thanks for your suggested changes! I think you're much more experienced with regex than I am -- I'll review your changes, apply it and test it to ensure it still works as expected. |
After I made the changes you suggested, I saw that GitHub has a button to commit your changes directly to my branch -- I didn't do that, so I'm sorry if that bothered you. I'm also not sure whether you prefer I click the "Resolve" button on the items you raised, or whether you do that. I did test these changes, and it seems to still work as expected! |
Either is fine as long as the changes get made 👍
I'll resolve them |
Pls reply to #5828 (comment) Everything else looks good |
Authored by: chexxor Closes yt-dlp#408
IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
Currently the Hidive extractor is broken:
After login, Hidive redirects your browser to a profile-selection page. On that page, you need to click the button/icon you want to use, which sends a JSON request to the server which sets the profile id as a cookie.
Also, the subtitle information is no longer available (from what I've seen) in a "data-captions" element on the page, but they _are_available in the "rendition" data structure that Hidive gives us.
Fixes:
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:
What is the purpose of your pull request?