1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-13 11:27:30 +08:00

[BlogTalkRadio] Add new extractor

This commit is contained in:
Déstin Reed 2017-01-09 19:04:52 +01:00
parent e7ac722d62
commit dea421f393
2 changed files with 34 additions and 0 deletions

View 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),
}

View File

@ -106,6 +106,7 @@ from .bleacherreport import (
BleacherReportCMSIE, BleacherReportCMSIE,
) )
from .blinkx import BlinkxIE from .blinkx import BlinkxIE
from .blogtalkradio import BlogTalkRadioIE
from .bloomberg import BloombergIE from .bloomberg import BloombergIE
from .bokecc import BokeCCIE from .bokecc import BokeCCIE
from .bpb import BpbIE from .bpb import BpbIE