1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-13 19:47:31 +08:00

added --no-generic option to skip the generic information extractor.

This commit is contained in:
jakeogh 2013-10-19 14:59:46 -07:00
parent f8b45beacc
commit 13d08e303e
2 changed files with 5 additions and 1 deletions

View File

@ -198,6 +198,7 @@ def parseOpts(overrideArguments=None):
help='Output descriptions of all supported extractors', default=False)
general.add_option('--proxy', dest='proxy', default=None, help='Use the specified HTTP/HTTPS proxy', metavar='URL')
general.add_option('--no-check-certificate', action='store_true', dest='no_check_certificate', default=False, help='Suppress HTTPS certificate validation.')
general.add_option('--no-generic', action='store_true', dest='no_generic', default=False, help='Do not attempt to fall back on the generic information extractor.')
general.add_option(
'--cache-dir', dest='cachedir', default=get_cachedir(), metavar='DIR',
help='Location in the filesystem where youtube-dl can store downloaded information permanently. By default $XDG_CACHE_HOME/youtube-dl or ~/.cache/youtube-dl .')

View File

@ -1,3 +1,4 @@
import sys
from .appletrailers import AppleTrailersIE
from .addanime import AddAnimeIE
from .archiveorg import ArchiveOrgIE
@ -170,7 +171,9 @@ _ALL_CLASSES = [
for name, klass in globals().items()
if name.endswith('IE') and name != 'GenericIE'
]
_ALL_CLASSES.append(GenericIE)
if '--no-generic' not in sys.argv:
_ALL_CLASSES.append(GenericIE)
def gen_extractors():