]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/weiqitv.py
3dafbeec2c5f7ba0b2e18ec621c67966214d3307
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class WeiqiTVIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://www\.weiqitv\.com/index/video_play\?videoId=(?P<id>[A-Za-z0-9]+)'
12 'url': 'http://www.weiqitv.com/index/video_play?videoId=53c744f09874f0e76a8b46f3',
13 'md5': '26450599afd64c513bc77030ad15db44',
15 'id': '53c744f09874f0e76a8b46f3',
20 'url': 'http://www.weiqitv.com/index/video_play?videoId=567379a2d4c36cca518b4569',
22 'id': '567379a2d4c36cca518b4569',
27 'url': 'http://www.weiqitv.com/index/video_play?videoId=5430220a9874f088658b4567',
29 'id': '5430220a9874f088658b4567',
31 'title': '二路托过的手段和运用',
35 def _real_extract(self
, url
):
36 media_id
= self
._match
_id
(url
)
37 page
= self
._download
_webpage
(url
, media_id
)
39 info_json_str
= self
._search
_regex
(
40 'var\s+video\s*=\s*(.+});', page
, 'info json str')
41 info_json
= self
._parse
_json
(info_json_str
, media_id
)
43 letvcloud_url
= self
._search
_regex
(
44 'var\s+letvurl\s*=\s*"([^"]+)', page
, 'letvcloud url')
47 '_type': 'url_transparent',
48 'ie_key': 'LetvCloud',
50 'title': info_json
['name'],