]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/audioboom.py
2ec2d7092aca0468d122d9ab658f1ef848da7f90
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..utils
import float_or_none
8 class AudioBoomIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?audioboom\.com/boos/(?P<id>[0-9]+)'
11 'url': 'https://audioboom.com/boos/4279833-3-09-2016-czaban-hour-3?t=0',
12 'md5': '63a8d73a055c6ed0f1e51921a10a5a76',
16 'title': '3/09/2016 Czaban Hour 3',
17 'description': 'Guest: Nate Davis - NFL free agency, Guest: Stan Gans',
19 'uploader': 'Steve Czaban',
20 'uploader_url': 're:https?://(?:www\.)?audioboom\.com/channel/steveczabanyahoosportsradio',
24 def _real_extract(self
, url
):
25 video_id
= self
._match
_id
(url
)
27 webpage
= self
._download
_webpage
(url
, video_id
)
31 clip_store
= self
._parse
_json
(
33 r
'data-new-clip-store=(["\'])(?P
<json
>{.*?
"clipId"\s
*:\s
*%s.*?
})\
1' % video_id,
34 webpage, 'clip store
', default='{}', group='json
'),
35 video_id, fatal=False)
37 clips = clip_store.get('clips
')
38 if clips and isinstance(clips, list) and isinstance(clips[0], dict):
45 audio_url = from_clip('clipURLPriorToLoading
') or self._og_search_property(
46 'audio
', webpage, 'audio url
')
47 title = from_clip('title
') or self._og_search_title(webpage)
48 description = from_clip('description
') or self._og_search_description(webpage)
50 duration = float_or_none(from_clip('duration
') or self._html_search_meta(
51 'weibo
:audio
:duration
', webpage))
53 uploader = from_clip('author
') or self._og_search_property(
54 'audio
:artist
', webpage, 'uploader
', fatal=False)
55 uploader_url = from_clip('author_url
') or self._html_search_meta(
56 'audioboo
:channel
', webpage, 'uploader url
')
62 'description
': description,
65 'uploader_url
': uploader_url,