[Question] How can i disable some hosts #8308

Closed
opened 2026-02-21 04:19:36 -05:00 by deekerman · 10 comments
Owner

Originally created by @yas9999 on GitHub (Jul 27, 2016).

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

Best regards,

Originally created by @yas9999 on GitHub (Jul 27, 2016). Hello, i wonder how can i disable some hosts to be downloaded (p0rn) for my case Best regards,
Author
Owner

@yan12125 commented on GitHub (Jul 27, 2016):

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

@yan12125 commented on GitHub (Jul 27, 2016): It's currently impossible with youtube-dl. See #6497 and #6501.
Author
Owner

@yas9999 commented on GitHub (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,

@yas9999 commented on GitHub (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,
Author
Owner

@yan12125 commented on GitHub (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

@yan12125 commented on GitHub (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`
Author
Owner

@phihag commented on GitHub (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.

@phihag commented on GitHub (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.
Author
Owner

@yas9999 commented on GitHub (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 ?

@yas9999 commented on GitHub (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 ?
Author
Owner

@yan12125 commented on GitHub (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.

@yan12125 commented on GitHub (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.
Author
Owner

@yas9999 commented on GitHub (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 commented on GitHub (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
Author
Owner

@yas9999 commented on GitHub (Oct 5, 2016):

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

@yas9999 commented on GitHub (Oct 5, 2016): maybe i just need to remove youtube.py from extractor folder ?
Author
Owner

@yan12125 commented on GitHub (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.

@yan12125 commented on GitHub (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.
Author
Owner

@yas9999 commented on GitHub (Oct 5, 2016):

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

@yas9999 commented on GitHub (Oct 5, 2016): hùm i got it thanks @yan12125 maybe i will just create an array with php
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#8308
No description provided.