]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/audioboom.py
1 from .common
import InfoExtractor
8 class AudioBoomIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?audioboom\.com/(?:boos|posts)/(?P<id>[0-9]+)'
11 'url': 'https://audioboom.com/posts/7398103-asim-chaudhry',
12 'md5': '7b00192e593ff227e6a315486979a42d',
16 'title': 'Asim Chaudhry',
17 'description': 'md5:2f3fef17dacc2595b5362e1d7d3602fc',
19 'uploader': 'Sue Perkins: An hour or so with...',
20 'uploader_url': r
're:https?://(?:www\.)?audioboom\.com/channel/perkins',
23 'url': 'https://audioboom.com/posts/4279833-3-09-2016-czaban-hour-3?t=0',
24 'only_matching': True,
27 def _real_extract(self
, url
):
28 video_id
= self
._match
_id
(url
)
30 webpage
= self
._download
_webpage
(url
, video_id
)
34 clip_store
= self
._parse
_json
(
35 self
._html
_search
_regex
(
36 r
'data-new-clip-store=(["\'])(?P
<json
>{.+?}
)\
1',
37 webpage, 'clip store
', default='{}', group='json
'),
38 video_id, fatal=False)
40 clips = clip_store.get('clips
')
41 if clips and isinstance(clips, list) and isinstance(clips[0], dict):
46 return clip.get(field)
48 audio_url = from_clip('clipURLPriorToLoading
') or self._og_search_property(
49 'audio
', webpage, 'audio url
')
50 title = from_clip('title
') or self._html_search_meta(
51 ['og
:title
', 'og
:audio
:title
', 'audio_title
'], webpage)
52 description = from_clip('description
') or clean_html(from_clip('formattedDescription
')) or self._og_search_description(webpage)
54 duration = float_or_none(from_clip('duration
') or self._html_search_meta(
55 'weibo
:audio
:duration
', webpage))
57 uploader = from_clip('author
') or self._html_search_meta(
58 ['og
:audio
:artist
', 'twitter
:audio
:artist_name
', 'audio_artist
'], webpage, 'uploader
')
59 uploader_url = from_clip('author_url
') or self._html_search_meta(
60 'audioboo
:channel
', webpage, 'uploader url
')
66 'description
': description,
69 'uploader_url
': uploader_url,