]>
jfr.im git - yt-dlp.git/blob - youtube_dlc/extractor/tmz.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class TMZIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?tmz\.com/videos/.*(?P<id>[^/?#]{10,10})'
10 'url': 'http://www.tmz.com/videos/0_okj015ty/',
11 'md5': '4d22a51ef205b6c06395d8394f72d560',
15 'title': 'Kim Kardashian\'s Boobs Unlock a Mystery!',
16 'timestamp': 1394747163,
17 'uploader_id': 'batchUser',
18 'upload_date': '20140313',
21 'url': 'http://www.tmz.com/videos/0-cegprt2p/',
25 'title': "No Charges Against Hillary Clinton? Harvey Says It Ain't Over Yet",
26 'timestamp': 1467831837,
27 'uploader_id': 'batchUser',
28 'upload_date': '20160706',
31 'url': 'https://www.tmz.com/videos/071119-chris-morgan-women-4590005-0-zcsejvcr/',
35 'title': "Angry Bagel Shop Guy Says He Doesn't Trust Women",
36 'timestamp': 1562889485,
37 'uploader_id': 'batchUser',
38 'upload_date': '20190711',
42 def _real_extract(self
, url
):
43 video_id
= self
._match
_id
(url
).replace('-', '_')
44 return self
.url_result('kaltura:591531:%s' % video_id
, 'Kaltura', video_id
)
47 class TMZArticleIE(InfoExtractor
):
48 _VALID_URL
= r
'https?://(?:www\.)?tmz\.com/\d{4}/\d{2}/\d{2}/(?P<id>[^/]+)/?'
50 'url': 'http://www.tmz.com/2015/04/19/bobby-brown-bobbi-kristina-awake-video-concert',
51 'md5': '5429c85db8bde39a473a56ca8c4c5602',
55 'title': 'Bobby Brown Tells Crowd ... Bobbi Kristina is Awake',
56 'timestamp': 1429467813,
57 'upload_date': '20150419',
58 'uploader_id': 'batchUser',
61 'url': 'http://www.tmz.com/2015/09/19/patti-labelle-concert-fan-stripping-kicked-out-nicki-minaj/',
65 'title': 'Patti LaBelle -- Goes Nuclear On Stripping Fan',
66 'timestamp': 1442683746,
67 'upload_date': '20150919',
68 'uploader_id': 'batchUser',
71 'url': 'http://www.tmz.com/2016/01/28/adam-silver-sting-drake-blake-griffin/',
75 'title': "NBA's Adam Silver -- Blake Griffin's a Great Guy ... He'll Learn from This",
76 'timestamp': 1454010989,
77 'upload_date': '20160128',
78 'uploader_id': 'batchUser',
81 'url': 'http://www.tmz.com/2016/10/27/donald-trump-star-vandal-arrested-james-otis/',
85 'title': "Trump Star Vandal -- I'm Not Afraid of Donald or the Cops!",
86 'timestamp': 1477500095,
87 'upload_date': '20161026',
88 'uploader_id': 'batchUser',
92 def _real_extract(self
, url
):
93 video_id
= self
._match
_id
(url
)
94 webpage
= self
._download
_webpage
(url
, video_id
)
95 params
= self
._html
_search
_regex
(r
'TMZ.actions.clickLink\(([\s\S]+?)\)',
96 webpage
, 'embedded video info').split(',')
97 new_url
= params
[0].strip("'\"")
99 return self
.url_result(new_url
)