mirror of https://github.com/yt-dlp/yt-dlp
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.2 KiB
Python
31 lines
1.2 KiB
Python
9 years ago
|
from .common import InfoExtractor
|
||
8 years ago
|
from .internetvideoarchive import InternetVideoArchiveIE
|
||
11 years ago
|
|
||
|
|
||
9 years ago
|
class RottenTomatoesIE(InfoExtractor):
|
||
8 years ago
|
_VALID_URL = r'https?://(?:www\.)?rottentomatoes\.com/m/[^/]+/trailers/(?P<id>\d+)'
|
||
11 years ago
|
|
||
|
_TEST = {
|
||
11 years ago
|
'url': 'http://www.rottentomatoes.com/m/toy_story_3/trailers/11028566/',
|
||
|
'info_dict': {
|
||
8 years ago
|
'id': '11028566',
|
||
10 years ago
|
'ext': 'mp4',
|
||
9 years ago
|
'title': 'Toy Story 3',
|
||
8 years ago
|
'description': 'From the creators of the beloved TOY STORY films, comes a story that will reunite the gang in a whole new way.',
|
||
8 years ago
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||
11 years ago
|
},
|
||
|
}
|
||
9 years ago
|
|
||
|
def _real_extract(self, url):
|
||
|
video_id = self._match_id(url)
|
||
|
webpage = self._download_webpage(url, video_id)
|
||
8 years ago
|
iva_id = self._search_regex(r'publishedid=(\d+)', webpage, 'internet video archive id')
|
||
9 years ago
|
|
||
|
return {
|
||
8 years ago
|
'_type': 'url_transparent',
|
||
|
'url': 'http://video.internetvideoarchive.net/player/6/configuration.ashx?domain=www.videodetective.com&customerid=69249&playerid=641&publishedid=' + iva_id,
|
||
|
'ie_key': InternetVideoArchiveIE.ie_key(),
|
||
8 years ago
|
'id': video_id,
|
||
9 years ago
|
'title': self._og_search_title(webpage),
|
||
|
}
|