1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-14 14:32:54 +08:00

[gdcvault] use HeadRequest and _request_webpage

This commit is contained in:
remitamine 2015-07-31 11:31:53 +01:00
parent c42f35addb
commit 104c343c93

View File

@ -10,6 +10,7 @@ from ..compat import (
from ..utils import ( from ..utils import (
remove_end, remove_end,
determine_ext, determine_ext,
HEADRequest,
) )
@ -150,8 +151,8 @@ class GDCVaultIE(InfoExtractor):
r'<td><strong>Session Name</strong></td>\s*<td>(.*?)</td>', r'<td><strong>Session Name</strong></td>\s*<td>(.*?)</td>',
start_page, 'title') start_page, 'title')
video_url = 'http://www.gdcvault.com' + direct_url video_url = 'http://www.gdcvault.com' + direct_url
request = compat_urllib_request.Request(video_url, method='HEAD') request = HEADRequest(video_url)
head = compat_urllib_request.urlopen(request) head = self._request_webpage(request, video_id)
return { return {
'id': video_id, 'id': video_id,