1 from .common
import InfoExtractor
11 class BeegIE(InfoExtractor
):
12 _VALID_URL
= r
'https?://(?:www\.)?beeg\.(?:com(?:/video)?)/-?(?P<id>\d+)'
14 'url': 'https://beeg.com/-0983946056129650',
15 'md5': '51d235147c4627cfce884f844293ff88',
17 'id': '0983946056129650',
19 'title': 'sucked cock and fucked in a private plane',
23 'upload_date': '20220131',
24 'timestamp': 1643656455,
25 'display_id': '2540839',
28 'url': 'https://beeg.com/-0599050563103750?t=4-861',
29 'md5': 'bd8b5ea75134f7f07fad63008db2060e',
31 'id': '0599050563103750',
33 'title': 'Bad Relatives',
37 'description': 'md5:b4fc879a58ae6c604f8f259155b7e3b9',
38 'timestamp': 1643623200,
39 'display_id': '2569965',
40 'upload_date': '20220131',
44 'url': 'https://beeg.com/1941093077?t=911-1391',
45 'only_matching': True,
48 'url': 'https://beeg.com/1277207756',
49 'only_matching': True,
52 def _real_extract(self
, url
):
53 video_id
= self
._match
_id
(url
)
55 webpage
= self
._download
_webpage
(url
, video_id
)
57 video
= self
._download
_json
(
58 f
'https://store.externulls.com/facts/file/{video_id}',
59 video_id
, f
'Downloading JSON for {video_id}')
61 fc_facts
= video
.get('fc_facts')
64 if not first_fact
or try_get(fact
, lambda x
: x
['id'] < first_fact
['id']):
67 resources
= traverse_obj(video
, ('file', 'hls_resources')) or first_fact
.get('hls_resources')
70 for format_id
, video_uri
in resources
.items():
73 height
= int_or_none(self
._search
_regex
(r
'fl_cdn_(\d+)', format_id
, 'height', default
=None))
74 current_formats
= self
._extract
_m
3u8_formats
(f
'https://video.beeg.com/{video_uri}', video_id
, ext
='mp4', m3u8_id
=str(height
))
75 for f
in current_formats
:
77 formats
.extend(current_formats
)
81 'display_id': str_or_none(first_fact
.get('id')),
82 'title': traverse_obj(video
, ('file', 'stuff', 'sf_name')),
83 'description': traverse_obj(video
, ('file', 'stuff', 'sf_story')),
84 'timestamp': unified_timestamp(first_fact
.get('fc_created')),
85 'duration': int_or_none(traverse_obj(video
, ('file', 'fl_duration'))),
86 'tags': traverse_obj(video
, ('tags', ..., 'tg_name')),
88 'age_limit': self
._rta
_search
(webpage
),