diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-07-16 03:06:04 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-07-16 03:06:04 +0700 |
commit | decf86044d17a8ec04e43a4805a0092622d976ae (patch) | |
tree | 1c39fc2aa7f59168b3113d96e43a811bb9d8c21c /youtube_dl/extractor/pear.py | |
parent | 94b817edebb63c3d8485e1ae27cc394dd9e21f9d (diff) |
[pearvideo] Improve (closes #13031)
Diffstat (limited to 'youtube_dl/extractor/pear.py')
-rw-r--r-- | youtube_dl/extractor/pear.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/youtube_dl/extractor/pear.py b/youtube_dl/extractor/pear.py deleted file mode 100644 index 77fd46852..000000000 --- a/youtube_dl/extractor/pear.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 -from __future__ import unicode_literals - -from .common import InfoExtractor - - -class PearIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?pearvideo\.com/video_(?P<id>[0-9]+)' - _TEST = { - 'url': 'http://www.pearvideo.com/video_1076290', - 'info_dict': { - 'id': '1076290', - 'ext': 'mp4', - 'title': '小浣熊在主人家玻璃上滚石头:没砸', - 'description': '小浣熊找到一个小石头,仿佛发现了一个宝贝。它不停地用石头按在玻璃上,滚来滚去,吸引主人注意。', - 'url': 'http://video.pearvideo.com/mp4/short/20170508/cont-1076290-10438018-hd.mp4' - } - } - - def _real_extract(self, url): - video_id = self._match_id(url) - webpage = self._download_webpage(url, video_id) - - title = self._html_search_regex(r'<h1[^>]+class="video-tt">(.+)</h1>', webpage, 'title', fatal=False) - description = self._html_search_regex(r'<div[^>]+class="summary"[^>]*>([^<]+)<', webpage, 'description', fatal=False) - url = self._html_search_regex(r'hdUrl="(.*?)"', webpage, 'url', fatal=False) - - return { - 'id': video_id, - 'ext': 'mp4', - 'title': title, - 'description': description, - 'url': url - } |