mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-13 01:07:21 +08:00
[BlogTalkRadio] Add new extractor
This commit is contained in:
parent
e7ac722d62
commit
dea421f393
33
youtube_dl/extractor/blogtalkradio.py
Normal file
33
youtube_dl/extractor/blogtalkradio.py
Normal file
@ -0,0 +1,33 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
|
||||
class BlogTalkRadioIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?blogtalkradio\.com/(?:[^/]+/)+(?P<id>[^.]+)'
|
||||
_TEST = {
|
||||
'url': 'http://www.blogtalkradio.com/ghost/2008/02/20/true-conservative-radio-hosted-by-ghost',
|
||||
'md5': '733fdaef2a328f7c8884ac6a33ca0097',
|
||||
'info_dict': {
|
||||
'id': 'true-conservative-radio-hosted-by-ghost',
|
||||
'ext': 'mp3',
|
||||
'title': 'True Conservative Radio hosted by Ghost',
|
||||
'description': 'free format (political chat)',
|
||||
'thumbnail': r're:^https?://.*\.jpg$',
|
||||
}
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
display_id = self._match_id(url)
|
||||
webpage = self._download_webpage(url, display_id)
|
||||
|
||||
title = self._og_search_title(webpage)
|
||||
audio_url = self._html_search_meta('twitter:player:stream', webpage, 'audio url')
|
||||
|
||||
return {
|
||||
'id': display_id,
|
||||
'title': title,
|
||||
'url': audio_url,
|
||||
'description': self._og_search_description(webpage),
|
||||
'thumbnail': self._og_search_thumbnail(webpage),
|
||||
}
|
@ -106,6 +106,7 @@ from .bleacherreport import (
|
||||
BleacherReportCMSIE,
|
||||
)
|
||||
from .blinkx import BlinkxIE
|
||||
from .blogtalkradio import BlogTalkRadioIE
|
||||
from .bloomberg import BloombergIE
|
||||
from .bokecc import BokeCCIE
|
||||
from .bpb import BpbIE
|
||||
|
Loading…
x
Reference in New Issue
Block a user