1 from .common
import InfoExtractor
11 class ErocastIE(InfoExtractor
):
12 _VALID_URL
= r
'https?://(?:www\.)?erocast\.me/track/(?P<id>[0-9]+)'
14 'url': 'https://erocast.me/track/9787/f',
15 'md5': 'af63b91f5f231096aba54dd682abea3b',
18 'title': '[F4M] Your roommate, who is definitely not possessed by an alien, suddenly wants to fuck you',
19 'url': 'https://erocast.s3.us-east-2.wasabisys.com/1220419/track.m3u8',
22 'release_timestamp': 1696178652,
23 'release_date': '20231001',
24 'modified_timestamp': int,
26 'description': 'ExtraTerrestrial Tuesday!',
27 'uploader': 'clarissaisshy',
28 'uploader_id': '8113',
29 'uploader_url': 'https://erocast.me/clarissaisshy',
30 'thumbnail': 'https://erocast.s3.us-east-2.wasabisys.com/1220418/conversions/1696179247-lg.jpg',
34 'webpage_url': 'https://erocast.me/track/9787/f4m-your-roommate-who-is-definitely-not-possessed-by-an-alien-suddenly-wants-to-fuck-you',
38 def _real_extract(self
, url
):
39 video_id
= self
._match
_id
(url
)
40 webpage
= self
._download
_webpage
(url
, video_id
)
41 data
= self
._search
_json
(
42 rf
'<script>\s*var song_data_{video_id}\s*=', webpage
, 'data', video_id
, end_pattern
=r
'</script>')
46 'formats': self
._extract
_m
3u8_formats
(
47 data
.get('file_url') or data
['stream_url'], video_id
, 'm4a', m3u8_id
='hls'),
49 **traverse_obj(data
, {
50 'title': ('title', {str}
),
51 'description': ('description', {str}
),
52 'release_timestamp': ('created_at', {parse_iso8601}
),
53 'modified_timestamp': ('updated_at', {parse_iso8601}
),
54 'uploader': ('user', 'name', {str}
),
55 'uploader_id': ('user', 'id', {str_or_none}
),
56 'uploader_url': ('user', 'permalink_url', {url_or_none}
),
57 'thumbnail': ('artwork_url', {url_or_none}
),
58 'duration': ('duration', {int_or_none}
),
59 'view_count': ('plays', {int_or_none}
),
60 'comment_count': ('comment_count', {int_or_none}
),
61 'webpage_url': ('permalink_url', {url_or_none}
),