mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-23 04:30:10 +09:00
Only verify the URL when it's an HTTP download
This commit is contained in:
parent
49c0028a7a
commit
60f8049d05
10
youtube-dl
10
youtube-dl
@ -316,10 +316,12 @@ class FileDownloader(object):
|
|||||||
"""Process a single dictionary returned by an InfoExtractor."""
|
"""Process a single dictionary returned by an InfoExtractor."""
|
||||||
# Do nothing else if in simulate mode
|
# Do nothing else if in simulate mode
|
||||||
if self.params.get('simulate', False):
|
if self.params.get('simulate', False):
|
||||||
try:
|
# Verify URL if it's an HTTP one
|
||||||
info_dict['url'] = self.verify_url(info_dict['url'].encode('utf-8')).decode('utf-8')
|
if info_dict['url'].startswith('http'):
|
||||||
except (OSError, IOError, urllib2.URLError, httplib.HTTPException, socket.error), err:
|
try:
|
||||||
raise UnavailableFormatError
|
info_dict['url'] = self.verify_url(info_dict['url'].encode('utf-8')).decode('utf-8')
|
||||||
|
except (OSError, IOError, urllib2.URLError, httplib.HTTPException, socket.error), err:
|
||||||
|
raise UnavailableFormatError
|
||||||
|
|
||||||
# Forced printings
|
# Forced printings
|
||||||
if self.params.get('forcetitle', False):
|
if self.params.get('forcetitle', False):
|
||||||
|
Loading…
Reference in New Issue
Block a user