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

[Question] How can i disable some hosts #10174

Closed
yas9999 opened this issue Jul 27, 2016 · 10 comments
Closed

[Question] How can i disable some hosts #10174

yas9999 opened this issue Jul 27, 2016 · 10 comments

Comments

@yas9999
Copy link

@yas9999 yas9999 commented Jul 27, 2016

Hello,
i wonder how can i disable some hosts to be downloaded (p0rn) for my case

Best regards,

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 27, 2016

It's currently impossible with youtube-dl. See #6497 and #6501.

@yan12125 yan12125 closed this Jul 27, 2016
@yas9999
Copy link
Author

@yas9999 yas9999 commented Jul 27, 2016

thank you bro, but i thought that i can disable some hosts by using /etc/youtube-dl.conf file !
i'm using HTML GUI from so i guess i can disable some by using php (array function )

regards,

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 27, 2016

Disable extractors via configuration files is not implemented yet. So far you can remove some lines from youtube_dl/extractor/extractors.py

@phihag
Copy link
Contributor

@phihag phihag commented Jul 27, 2016

You can disable videos restricted to age 18 and above by passing in --age-limit 17 in /etc/youtube-dl.conf. That is by far the most sensible solution, and does cover pornographic videos from hosts that are not exclusively distributing pornography such as YouTube. It even allows you a more fine-grained control. For instance, if you deploy youtube-dl in a school with kids as young as 13, pass in --age-limit 12 to ensure that they don't get videos unsuitable for their age.

@yas9999
Copy link
Author

@yas9999 yas9999 commented Jul 27, 2016

thank you @yan12125 & @phihag,
porn was just an example i may need to remove for example vimeo !
so if there is no bugs i will edit youtube_dl/extractor/extractors.py
but where is located extractors.py in ubuntu 14.04 ?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 27, 2016

That depends. If you download youtube-dl via wget or curl, you need to extract all files with unzip, modify them and re-package all files with zip again. If you use pip, pip show youtube-dl | grep Location will tell you where it is.

@yas9999
Copy link
Author

@yas9999 yas9999 commented Oct 5, 2016

@yan12125
i still don't get the idea ! there is no zip files :
$ pip show youtube-dl | grep Location
Location: /usr/local/lib/python2.7/dist-packages
$ ls /usr/local/lib/python2.7/dist-packages

backports functools32
backports.ssl_match_hostname-3.5.0.1.egg-info functools32-3.2.3_2.egg-info
cached_property-1.3.0.dist-info ipaddress-1.0.17.dist-info
cached_property.py ipaddress.py
cached_property.pyc ipaddress.pyc
compose jsonschema
docker jsonschema-2.5.1.dist-info
docker_compose-1.8.1.egg-info PyYAML-3.12.egg-info
dockerpty requests
dockerpty-0.4.1.egg-info requests-2.7.0.dist-info
docker_py-1.10.3.dist-info texttable-0.8.4.egg-info
dockerpycreds texttable.py
docker_pycreds-0.2.1.dist-info texttable.pyc
docopt-0.6.2.egg-info websocket
docopt.py websocket_client-0.37.0.egg-info
docopt.pyc yaml
enum youtube_dl
enum34-1.1.6.dist-info youtube_dl-2016.10.2.dist-info

please help me i really need to disable youtube

@yas9999
Copy link
Author

@yas9999 yas9999 commented Oct 5, 2016

maybe i just need to remove youtube.py from extractor folder ?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 5, 2016

Actually you've found it: /usr/local/lib/python2.7/dist-packages/youtube_dl

maybe i just need to remove youtube.py from extractor folder ?

You need to remove lines with youtube from extractors.py as well. Note that a few other extractors depend on youtube.py, so you may want to remove them all.

@yas9999
Copy link
Author

@yas9999 yas9999 commented Oct 5, 2016

hùm i got it thanks @yan12125 maybe i will just create an array with php

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.