]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/moevideo.py
2 from __future__
import unicode_literals
5 from .common
import InfoExtractor
12 class MoeVideoIE(InfoExtractor
):
13 IE_DESC
= 'LetitBit video services: moevideo.net, playreplay.net and videochart.net'
15 https?://(?P<host>(?:www\.)?
16 (?:(?:moevideo|playreplay|videochart)\.net|thesame\.tv))/
17 (?:video|framevideo|embed)/(?P<id>[0-9a-z]+\.[0-9A-Za-z]+)'''
18 _API_URL
= 'http://api.letitbit.net/'
19 _API_KEY
= 'tVL0gjqo5'
22 'url': 'http://moevideo.net/video/00297.0036103fe3d513ef27915216fd29',
23 'md5': '129f5ae1f6585d0e9bb4f38e774ffb3a',
25 'id': '00297.0036103fe3d513ef27915216fd29',
27 'title': 'Sink cut out machine',
28 'description': 'md5:f29ff97b663aefa760bf7ca63c8ca8a8',
29 'thumbnail': r
're:^https?://.*\.jpg$',
35 'skip': 'Video has been removed',
38 'url': 'http://playreplay.net/video/77107.7f325710a627383d40540d8e991a',
39 'md5': '74f0a014d5b661f0f0e2361300d1620e',
41 'id': '77107.7f325710a627383d40540d8e991a',
43 'title': 'Operacion Condor.',
44 'description': 'md5:7e68cb2fcda66833d5081c542491a9a3',
45 'thumbnail': r
're:^https?://.*\.jpg$',
49 'filesize': 588257923,
51 'skip': 'Video has been removed',
55 def _real_extract(self
, url
):
56 host
, video_id
= self
._match
_valid
_url
(url
).groups()
58 webpage
= self
._download
_webpage
(
59 'http://%s/video/%s' % (host
, video_id
),
60 video_id
, 'Downloading webpage')
62 title
= self
._og
_search
_title
(webpage
)
64 embed_webpage
= self
._download
_webpage
(
65 'http://%s/embed/%s' % (host
, video_id
),
66 video_id
, 'Downloading embed webpage')
67 video
= self
._parse
_json
(self
._search
_regex
(
68 r
'mvplayer\("#player"\s*,\s*({.+})',
69 embed_webpage
, 'mvplayer'), video_id
)['video']
74 'thumbnail': video
.get('poster') or self
._og
_search
_thumbnail
(webpage
),
75 'description': clean_html(self
._og
_search
_description
(webpage
)),
76 'duration': int_or_none(self
._og
_search
_property
('video:duration', webpage
)),
77 'url': video
['ourUrl'],