Browse Source

Merge pull request #3461 from tinybug/patch-2

Update vube.py
totalwebcasting
Sergey M. 11 years ago
parent
commit
d9760fd43c
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      youtube_dl/extractor/vube.py

+ 2
- 6
youtube_dl/extractor/vube.py View File

@ -71,12 +71,8 @@ class VubeIE(InfoExtractor):
mobj = re.match(self._VALID_URL, url) mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id') 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 = ( video = (
data.get('video') or data.get('video') or
data) data)


Loading…
Cancel
Save