mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-06-30 11:02:51 -05:00
Use the new '_download_xml' helper in more extractors
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import re
|
||||
import json
|
||||
import xml.etree.ElementTree
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
@ -26,9 +25,8 @@ class NHLBaseInfoExtractor(InfoExtractor):
|
||||
'path': initial_video_url.replace('.mp4', '_sd.mp4'),
|
||||
})
|
||||
path_url = 'http://video.nhl.com/videocenter/servlets/encryptvideopath?' + data
|
||||
path_response = self._download_webpage(path_url, video_id,
|
||||
path_doc = self._download_xml(path_url, video_id,
|
||||
u'Downloading final video url')
|
||||
path_doc = xml.etree.ElementTree.fromstring(path_response)
|
||||
video_url = path_doc.find('path').text
|
||||
|
||||
join = compat_urlparse.urljoin
|
||||
|
Reference in New Issue
Block a user