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

Add age-limit option on dailymotion to download explicit #18437

Closed
wants to merge 3 commits into from

Conversation

coffeecore
Copy link

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

#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)

@afu-dev
Copy link

afu-dev commented Dec 12, 2018

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, {})
Copy link

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) :
Copy link

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

meunierd referenced this pull request in meunierd/youtube-dl Feb 13, 2020
- 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
pareronia referenced this pull request in pareronia/youtube-dl Jun 22, 2020
- 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
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.

3 participants