|
|
@ -139,6 +139,7 @@ class YoutubeDL(object):
|
|
|
|
outtmpl: Template for output names.
|
|
|
|
outtmpl: Template for output names.
|
|
|
|
restrictfilenames: Do not allow "&" and spaces in file names
|
|
|
|
restrictfilenames: Do not allow "&" and spaces in file names
|
|
|
|
ignoreerrors: Do not stop on download errors.
|
|
|
|
ignoreerrors: Do not stop on download errors.
|
|
|
|
|
|
|
|
force_generic_extractor: Force downloader to use the generic extractor
|
|
|
|
nooverwrites: Prevent overwriting files.
|
|
|
|
nooverwrites: Prevent overwriting files.
|
|
|
|
playliststart: Playlist item to start at.
|
|
|
|
playliststart: Playlist item to start at.
|
|
|
|
playlistend: Playlist item to end at.
|
|
|
|
playlistend: Playlist item to end at.
|
|
|
@ -626,13 +627,16 @@ class YoutubeDL(object):
|
|
|
|
info_dict.setdefault(key, value)
|
|
|
|
info_dict.setdefault(key, value)
|
|
|
|
|
|
|
|
|
|
|
|
def extract_info(self, url, download=True, ie_key=None, extra_info={},
|
|
|
|
def extract_info(self, url, download=True, ie_key=None, extra_info={},
|
|
|
|
process=True):
|
|
|
|
process=True, force_generic_extractor=False):
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
Returns a list with a dictionary for each video we find.
|
|
|
|
Returns a list with a dictionary for each video we find.
|
|
|
|
If 'download', also downloads the videos.
|
|
|
|
If 'download', also downloads the videos.
|
|
|
|
extra_info is a dict containing the extra values to add to each result
|
|
|
|
extra_info is a dict containing the extra values to add to each result
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not ie_key and force_generic_extractor:
|
|
|
|
|
|
|
|
ie_key = 'Generic'
|
|
|
|
|
|
|
|
|
|
|
|
if ie_key:
|
|
|
|
if ie_key:
|
|
|
|
ies = [self.get_info_extractor(ie_key)]
|
|
|
|
ies = [self.get_info_extractor(ie_key)]
|
|
|
|
else:
|
|
|
|
else:
|
|
|
@ -1493,7 +1497,8 @@ class YoutubeDL(object):
|
|
|
|
for url in url_list:
|
|
|
|
for url in url_list:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
# It also downloads the videos
|
|
|
|
# It also downloads the videos
|
|
|
|
res = self.extract_info(url)
|
|
|
|
res = self.extract_info(
|
|
|
|
|
|
|
|
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
|
|
|
|
except UnavailableVideoError:
|
|
|
|
except UnavailableVideoError:
|
|
|
|
self.report_error('unable to download video')
|
|
|
|
self.report_error('unable to download video')
|
|
|
|
except MaxDownloadsReached:
|
|
|
|
except MaxDownloadsReached:
|
|
|
|