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

[Feature Request] New command-line argument to filter extractors. #28377

Open
3 tasks done
mattoz0 opened this issue Mar 8, 2021 · 3 comments
Open
3 tasks done

[Feature Request] New command-line argument to filter extractors. #28377

mattoz0 opened this issue Mar 8, 2021 · 3 comments
Labels

Comments

@mattoz0
Copy link

mattoz0 commented Mar 8, 2021

Checklist

  • I'm reporting a feature request
  • I've verified that I'm running youtube-dl version 2021.03.03
  • I've searched the bugtracker for similar feature requests including closed ones

Description

Would be nice if we could improve loading times by filtering the extractors that would be checked.

youtube-dl --extractors youtube url
youtube-dl --extractors youtube,soundcloud url

Often enough i would guess people know which service they are using! Extractor checking can take a lot of time on low powered devices. This would remove the need to make a custom build for a lot of usecases.

@mattoz0 mattoz0 added the request label Mar 8, 2021
@pukkandan
Copy link
Contributor

pukkandan commented Mar 8, 2021

There is an experimental feature lazy_extractors that tries to speed up extractor loading.

@mmkhitaryan
Copy link

AFAIK youtube-dl can cause SSRF. So that feature would also increase backend security for web apps. I have done something like this by monkey patching youtube_dl.extractor._ALL_CLASSES
https://stackoverflow.com/a/65284695/7415288
I think it would be better if there was a feature that allows doing that without monkey patching.

@mattoz0
Copy link
Author

mattoz0 commented Mar 8, 2021

Lazy extractors seems like a step in the right direction. However, my understanding is its still loading all the extractor's (if its going to load an extractor).

I propose filtering the __ALL_CLASSES array in youtube-dl/youtube_dl/extractor/init.py, based on the command line argument.

My assumption is a solution could be created, very similar to the link in the above monkey patching example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants