]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/aliexpress.py
1 from .common
import InfoExtractor
2 from ..compat
import compat_str
9 class AliExpressLiveIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://live\.aliexpress\.com/live/(?P<id>\d+)'
12 'url': 'https://live.aliexpress.com/live/2800002704436634',
13 'md5': 'e729e25d47c5e557f2630eaf99b740a5',
15 'id': '2800002704436634',
17 'title': 'CASIMA7.22',
18 'thumbnail': r
're:https?://.*\.jpg',
19 'uploader': 'CASIMA Official Store',
20 'timestamp': 1500717600,
21 'upload_date': '20170722',
25 def _real_extract(self
, url
):
26 video_id
= self
._match
_id
(url
)
28 webpage
= self
._download
_webpage
(url
, video_id
)
30 data
= self
._parse
_json
(
32 r
'(?s)runParams\s*=\s*({.+?})\s*;?\s*var',
33 webpage
, 'runParams'),
38 formats
= self
._extract
_m
3u8_formats
(
39 data
['replyStreamUrl'], video_id
, 'mp4',
40 entry_protocol
='m3u8_native', m3u8_id
='hls')
45 'thumbnail': data
.get('coverUrl'),
47 data
, lambda x
: x
['followBar']['name'], compat_str
),
48 'timestamp': float_or_none(data
.get('startTimeLong'), scale
=1000),