mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-23 14:57:51 +08:00
skip_http_head flag added
This commit is contained in:
parent
6c5c0bac3b
commit
626fcaa22a
@ -2226,13 +2226,15 @@ class GenericIE(InfoExtractor):
|
||||
else:
|
||||
video_id = self._generic_id(url)
|
||||
|
||||
self.to_screen('%s: Requesting header' % video_id)
|
||||
|
||||
head_req = HEADRequest(url)
|
||||
head_response = self._request_webpage(
|
||||
head_req, video_id,
|
||||
note=False, errnote='Could not send HEAD request to %s' % url,
|
||||
fatal=False)
|
||||
if self._downloader.params.get('skip_http_head') == None:
|
||||
head_response = False
|
||||
else:
|
||||
self.to_screen('%s: Requesting header' % video_id)
|
||||
head_req = HEADRequest(url)
|
||||
head_response = self._request_webpage(
|
||||
head_req, video_id,
|
||||
note=False, errnote='Could not send HEAD request to %s' % url,
|
||||
fatal=False)
|
||||
|
||||
if head_response is not False:
|
||||
# Check for redirect
|
||||
|
Loading…
Reference in New Issue
Block a user