diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-04-29 04:05:14 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-04-29 04:05:14 +0800 |
commit | cbbece96a25443dbf5cb66819883efa2e9b66de4 (patch) | |
tree | 9c4b588db0882a5e1822ddc26dea2b4e3d5c4f41 /youtube_dl/extractor | |
parent | 9d8ba307ef18e737efc0be5164b53e0546288a4d (diff) |
[yourupload] Simplify
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/yourupload.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/youtube_dl/extractor/yourupload.py b/youtube_dl/extractor/yourupload.py index 2064f4a69..4e25d6f22 100644 --- a/youtube_dl/extractor/yourupload.py +++ b/youtube_dl/extractor/yourupload.py @@ -1,8 +1,6 @@ # coding: utf-8 from __future__ import unicode_literals -import re - from .common import InfoExtractor @@ -35,25 +33,19 @@ class YourUploadIE(InfoExtractor): ] def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('id') + video_id = self._match_id(url) embed_url = 'http://embed.yucache.net/{0:}'.format(video_id) webpage = self._download_webpage(embed_url, video_id) title = self._og_search_title(webpage) - thumbnail = self._og_search_thumbnail(webpage) video_url = self._og_search_video_url(webpage) - - formats = [{ - 'format_id': 'sd', - 'url': video_url, - }] + thumbnail = self._og_search_thumbnail(webpage, default=None) return { 'id': video_id, 'title': title, - 'formats': formats, + 'url': video_url, 'thumbnail': thumbnail, 'http_headers': { 'Referer': embed_url, |