diff --git a/youtube_dl/extractor/iqiyi.py b/youtube_dl/extractor/iqiyi.py index 5df674daf..a5d774e4c 100644 --- a/youtube_dl/extractor/iqiyi.py +++ b/youtube_dl/extractor/iqiyi.py @@ -343,17 +343,22 @@ class IqiyiIE(InfoExtractor): # There's no simple way to determine whether an URL is a playlist or not # Sometimes there are playlist links in individual videos, so treat it # as a single video first - tvid = self._search_regex( - r'data-(?:player|shareplattrigger)-tvid\s*=\s*[\'"](\d+)', webpage, 'tvid', default=None) + tvid = self._search_regex([ + r'data-(?:player|shareplattrigger)-tvid\s*=\s*[\'"](\d+)', + r'param\[\'tvid\'\]\s*=\s*"(.+?)"', + r'"tvid":"(\d+)"', + ], webpage, 'tvid', default=None) if tvid is None: playlist_result = self._extract_playlist(webpage) if playlist_result: return playlist_result raise ExtractorError('Can\'t find any video') - video_id = self._search_regex( - r'data-(?:player|shareplattrigger)-videoid\s*=\s*[\'"]([a-f\d]+)', webpage, 'video_id') - + video_id = self._search_regex([ + r'data-(?:player|shareplattrigger)-videoid\s*=\s*[\'"]([a-f\d]+)', + r'param\[\'vid\'\]\s*=\s*"(.+?)"', + r'"vid":"(\w+)"' + ], webpage, 'video_id') formats = [] for _ in range(5): raw_data = self.get_raw_data(tvid, video_id) @@ -385,8 +390,7 @@ class IqiyiIE(InfoExtractor): self._sort_formats(formats) title = (get_element_by_id('widget-videotitle', webpage) or clean_html(get_element_by_attribute('class', 'mod-play-tit', webpage)) - or self._html_search_regex(r']+data-videochanged-title="word"[^>]*>([^<]+)', webpage, 'title')) - + or self._html_search_regex(r'([^<]+)', webpage, 'title')) return { 'id': video_id, 'title': title,