mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[aenetworks] add support for movie pages
This commit is contained in:
		| @@ -36,7 +36,7 @@ class AENetworksBaseIE(InfoExtractor): | ||||
| class AENetworksIE(AENetworksBaseIE): | ||||
|     IE_NAME = 'aenetworks' | ||||
|     IE_DESC = 'A+E Networks: A&E, Lifetime, History.com, FYI Network' | ||||
|     _VALID_URL = r'https?://(?:www\.)?(?:(?:history|aetv|mylifetime)\.com|fyi\.tv)/shows/(?P<id>[^/]+(?:/[^/]+){0,2})' | ||||
|     _VALID_URL = r'https?://(?:www\.)?(?:(?:history|aetv|mylifetime)\.com|fyi\.tv)/(?:shows/(?P<show_path>[^/]+(?:/[^/]+){0,2})|movies/(?P<movie_display_id>[^/]+)/full-movie)' | ||||
|     _TESTS = [{ | ||||
|         'url': 'http://www.history.com/shows/mountain-men/season-1/episode-1', | ||||
|         'md5': '8ff93eb073449f151d6b90c0ae1ef0c7', | ||||
| @@ -72,12 +72,17 @@ class AENetworksIE(AENetworksBaseIE): | ||||
|     }, { | ||||
|         'url': 'http://www.mylifetime.com/shows/project-runway-junior/season-1/episode-6', | ||||
|         'only_matching': True | ||||
|     }, { | ||||
|         'url': 'http://www.mylifetime.com/movies/center-stage-on-pointe/full-movie', | ||||
|         'only_matching': True | ||||
|     }] | ||||
|  | ||||
|     def _real_extract(self, url): | ||||
|         display_id = self._match_id(url) | ||||
|         show_path, movie_display_id = re.match(self._VALID_URL, url).groups() | ||||
|         display_id = show_path or movie_display_id | ||||
|         webpage = self._download_webpage(url, display_id) | ||||
|         url_parts = display_id.split('/') | ||||
|         if show_path: | ||||
|             url_parts = show_path.split('/') | ||||
|             url_parts_len = len(url_parts) | ||||
|             if url_parts_len == 1: | ||||
|                 entries = [] | ||||
| @@ -98,7 +103,6 @@ class AENetworksIE(AENetworksBaseIE): | ||||
|                         episode_attributes['data-videoid'])) | ||||
|                 return self.playlist_result( | ||||
|                     entries, self._html_search_meta('aetn:SeasonId', webpage)) | ||||
|         else: | ||||
|         video_id = self._html_search_meta('aetn:VideoID', webpage) | ||||
|         media_url = self._search_regex( | ||||
|             r"media_url\s*=\s*'([^']+)'", webpage, 'video url') | ||||
| @@ -115,7 +119,7 @@ class AENetworksIE(AENetworksBaseIE): | ||||
| class HistoryTopicIE(AENetworksBaseIE): | ||||
|     IE_NAME = 'history:topic' | ||||
|     IE_DESC = 'History.com Topic' | ||||
|     _VALID_URL = r'https?://(?:www\.)?history\.com/topics/(?:[^/]+/)?(?P<topic_id>[^/]+)/videos(?:/(?P<display_id>[^/?#]+))?' | ||||
|     _VALID_URL = r'https?://(?:www\.)?history\.com/topics/(?:[^/]+/)?(?P<topic_id>[^/]+)/videos(?:/(?P<video_display_id>[^/?#]+))?' | ||||
|     _TESTS = [{ | ||||
|         'url': 'http://www.history.com/topics/valentines-day/history-of-valentines-day/videos/bet-you-didnt-know-valentines-day?m=528e394da93ae&s=undefined&f=1&free=false', | ||||
|         'info_dict': { | ||||
| @@ -146,9 +150,9 @@ class HistoryTopicIE(AENetworksBaseIE): | ||||
|     }] | ||||
|  | ||||
|     def _real_extract(self, url): | ||||
|         topic_id, display_id = re.match(self._VALID_URL, url).groups() | ||||
|         if display_id: | ||||
|             webpage = self._download_webpage(url, display_id) | ||||
|         topic_id, video_display_id = re.match(self._VALID_URL, url).groups() | ||||
|         if video_display_id: | ||||
|             webpage = self._download_webpage(url, video_display_id) | ||||
|             release_url, video_id = re.search(r"_videoPlayer.play\('([^']+)'\s*,\s*'[^']+'\s*,\s*'(\d+)'\)", webpage).groups() | ||||
|             release_url = unescapeHTML(release_url) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Remita Amine
					Remita Amine