Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[ard] Reduce strictness of url regular expression #29091

Closed
wants to merge 2 commits into from

Conversation

olifre
Copy link

@olifre olifre commented May 20, 2021

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

The - is optional, and fails to match for example:
https://www.daserste.de/unterhaltung/serie/in-aller-freundschaft-die-jungen-aerzte/videos/diversity-tag-sanam-afrashteh100.html
Use -? to accept also URLs without - before the trailing part.

The `-` is optional, and fails to match for example:
https://www.daserste.de/unterhaltung/serie/in-aller-freundschaft-die-jungen-aerzte/videos/diversity-tag-sanam-afrashteh100.html
Use `-?` to accept also URLs without `-` before the trailing part.
@pukkandan
Copy link
Contributor

@olifre
Copy link
Author

olifre commented May 23, 2021

Maybe consider adding this as a test case

I surely can do that, but the link will be expired in ~1 year, since the content is only kept for one year. Is this still a useful test case?

@pukkandan
Copy link
Contributor

You can add it like this:

{
    'url': 'https://www.daserste.de/unterhaltung/serie/in-aller-freundschaft-die-jungen-aerzte/videos/diversity-tag-sanam-afrashteh100.html',
    'only_matching': True,
}, 

That way only the regex is tested, not the download

@olifre
Copy link
Author

olifre commented May 23, 2021

@pukkandan Many thanks, this was not clear to me (my first youtube-dl PR). I added the test in the second commit :-).

pukkandan pushed a commit to yt-dlp/yt-dlp that referenced this pull request May 23, 2021
@dstftw dstftw closed this in d495292 May 29, 2021
nixxo pushed a commit to nixxo/yt-dlp that referenced this pull request Nov 22, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants