1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

Update vube.py

fix extractor is broken #3459
This commit is contained in:
tinybug 2014-08-07 11:24:51 +08:00
parent cccfab6412
commit d42b2d2985

View file

@ -71,12 +71,8 @@ class VubeIE(InfoExtractor):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')
webpage = self._download_webpage(url, video_id)
data_json = self._search_regex(
r'(?s)window\["(?:tapiVideoData|vubeOriginalVideoData)"\]\s*=\s*(\{.*?\n});\n',
webpage, 'video data'
)
data = json.loads(data_json)
json_url = 'http://vube.com/t-api/v1/video/%s?country=US&limit=120&region=US' % video_id
data = self._download_json(json_url, video_id)
video = (
data.get('video') or
data)