parent
fb38aa8b53
commit
3c6c7e7d7e
1 changed files with 9 additions and 7 deletions
|
@ -159,9 +159,10 @@ class GDCVaultIE(InfoExtractor):
|
||||||
'title': title,
|
'title': title,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PLAYER_REGEX = r'<iframe src="(?P<xml_root>.+?)/player.*?\.html.*?".*?</iframe>'
|
||||||
|
|
||||||
xml_root = self._html_search_regex(
|
xml_root = self._html_search_regex(
|
||||||
r'<iframe src="(?P<xml_root>.*?)player.html.*?".*?</iframe>',
|
PLAYER_REGEX, start_page, 'xml root', default=None)
|
||||||
start_page, 'xml root', default=None)
|
|
||||||
if xml_root is None:
|
if xml_root is None:
|
||||||
# Probably need to authenticate
|
# Probably need to authenticate
|
||||||
login_res = self._login(webpage_url, display_id)
|
login_res = self._login(webpage_url, display_id)
|
||||||
|
@ -171,18 +172,19 @@ class GDCVaultIE(InfoExtractor):
|
||||||
start_page = login_res
|
start_page = login_res
|
||||||
# Grab the url from the authenticated page
|
# Grab the url from the authenticated page
|
||||||
xml_root = self._html_search_regex(
|
xml_root = self._html_search_regex(
|
||||||
r'<iframe src="(.*?)player.html.*?".*?</iframe>',
|
PLAYER_REGEX, start_page, 'xml root')
|
||||||
start_page, 'xml root')
|
|
||||||
|
|
||||||
xml_name = self._html_search_regex(
|
xml_name = self._html_search_regex(
|
||||||
r'<iframe src=".*?\?xml=(.+?\.xml).*?".*?</iframe>',
|
r'<iframe src=".*?\?xml=(.+?\.xml).*?".*?</iframe>',
|
||||||
start_page, 'xml filename', default=None)
|
start_page, 'xml filename', default=None)
|
||||||
if xml_name is None:
|
if xml_name is None:
|
||||||
# Fallback to the older format
|
# Fallback to the older format
|
||||||
xml_name = self._html_search_regex(r'<iframe src=".*?\?xmlURL=xml/(?P<xml_file>.+?\.xml).*?".*?</iframe>', start_page, 'xml filename')
|
xml_name = self._html_search_regex(
|
||||||
|
r'<iframe src=".*?\?xmlURL=xml/(?P<xml_file>.+?\.xml).*?".*?</iframe>',
|
||||||
|
start_page, 'xml filename')
|
||||||
|
|
||||||
xml_description_url = xml_root + 'xml/' + xml_name
|
xml_description = self._download_xml(
|
||||||
xml_description = self._download_xml(xml_description_url, display_id)
|
'%s/xml/%s' % (xml_root, xml_name), display_id)
|
||||||
|
|
||||||
video_title = xml_description.find('./metadata/title').text
|
video_title = xml_description.find('./metadata/title').text
|
||||||
video_formats = self._parse_mp4(xml_description)
|
video_formats = self._parse_mp4(xml_description)
|
||||||
|
|
Loading…
Reference in a new issue