-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Add age-limit option on dailymotion to download explicit #18437
Conversation
Hello, any news on this PR? This one may help us on a problem we're having on Dailymotion for the past few weeks. |
if (17 < age_limit) : | ||
metadata_url = update_url_query( | ||
'https://www.dailymotion.com/player/metadata/video/%s' | ||
% video_id, {}) |
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.
By far the better solution is to pull the extra dict
out into a variable guarded by this if
rather than duplicating the "meat" of that call; something like:
if 17 < age_limit:
metadata_extra = {}
else:
metadata_extra = {
'embedder': url,
'integration': 'inline',
'GK_PV5_NEON': '1',
}
metadata_url = update_url_query(
'https://www.dailymotion.com/player/metadata/video/%s'
% video_id, metadata_extra)
'integration': 'inline', | ||
'GK_PV5_NEON': '1', | ||
}) | ||
if (17 < age_limit) : |
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.
Please continue to make the code PEP8 compliant, which the extra space between the condition and the :
violate, as does the extra space between your else
and :
below
The parens around the test are also unnecessary, but I don't believe they're strictly speaking wrong
- extract http formats included in m3u8 manifest - fix user extraction(closes #3553)(closes #21415) - add suport for User Authentication(closes #11491) - fix password protected videos extraction(closes #23176) - respect age limit option and family filter cookie value(closes #18437) - handle video url playlist query param - report alowed countries for geo-restricted videos
- extract http formats included in m3u8 manifest - fix user extraction(closes #3553)(closes #21415) - add suport for User Authentication(closes #11491) - fix password protected videos extraction(closes #23176) - respect age limit option and family filter cookie value(closes #18437) - handle video url playlist query param - report alowed countries for geo-restricted videos
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])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:
What is the purpose of your pull request?
Description of your pull request and other information
#18398 On Dailymotion, you can't download Explicit Content without cookie. It's because metadata page has GET params which raises error. If you remove these params, you can download. So, I added test on age_limit CLI option to generate good url. (Sorry, I'm not Python developer, I hope no bullshit in my little add)