]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/tlc.py
2 from __future__
import unicode_literals
5 from .common
import InfoExtractor
6 from .brightcove
import BrightcoveIE
7 from .discovery
import DiscoveryIE
10 class TlcIE(DiscoveryIE
):
12 _VALID_URL
= r
'http://www\.tlc\.com\/[a-zA-Z0-9\-]*/[a-zA-Z0-9\-]*/videos/(?P<id>[a-zA-Z0-9\-]*)(.htm)?'
15 'url': 'http://www.tlc.com/tv-shows/cake-boss/videos/too-big-to-fly.htm',
16 'md5': 'c4038f4a9b44d0b5d74caaa64ed2a01a',
20 'title': 'Cake Boss: Too Big to Fly',
21 'description': 'Buddy has taken on a high flying task.',
27 class TlcDeIE(InfoExtractor
):
29 _VALID_URL
= r
'http://www\.tlc\.de/sendungen/[^/]+/videos/(?P<title>[^/?]+)'
32 'url': 'http://www.tlc.de/sendungen/breaking-amish/videos/#3235167922001',
34 'id': '3235167922001',
36 'title': 'Breaking Amish: Die Welt da draußen',
37 'uploader': 'Discovery Networks - Germany',
38 'description': 'Vier Amische und eine Mennonitin wagen in New York'
39 ' den Sprung in ein komplett anderes Leben. Begleitet sie auf'
40 ' ihrem spannenden Weg.',
44 def _real_extract(self
, url
):
45 mobj
= re
.match(self
._VALID
_URL
, url
)
46 title
= mobj
.group('title')
47 webpage
= self
._download
_webpage
(url
, title
)
48 iframe_url
= self
._search
_regex
(
49 '<iframe src="(http://www\.tlc\.de/wp-content/.+?)"', webpage
,
51 # Otherwise we don't get the correct 'BrightcoveExperience' element,
52 # example: http://www.tlc.de/sendungen/cake-boss/videos/cake-boss-cannoli-drama/
53 iframe_url
= iframe_url
.replace('.htm?', '.php?')
54 iframe
= self
._download
_webpage
(iframe_url
, title
)
58 'url': BrightcoveIE
._extract
_brightcove
_url
(iframe
),
59 'ie': BrightcoveIE
.ie_key(),