Update iqiyi.py

Some links cannot be parsed normally.

badcase:
    https://www.iqiyi.com/v_zppp3pw658.html
This commit is contained in:
SunG0011 2023-04-17 17:21:03 +08:00 committed by GitHub
parent 2aaa877a9b
commit 6fd6d5bdc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,10 +131,10 @@ class Iqiyi(VideoExtractor):
html = get_html(self.url)
tvid = r1(r'#curid=(.+)_', self.url) or \
r1(r'tvid=([^&]+)', self.url) or \
r1(r'data-player-tvid="([^"]+)"', html) or r1(r'tv(?:i|I)d=(\w+?)\&', html) or r1(r'param\[\'tvid\'\]\s*=\s*"(.+?)"', html)
r1(r'data-player-tvid="([^"]+)"', html) or r1(r'tv(?:i|I)d=(\w+?)\&', html) or r1(r'param\[\'tvid\'\]\s*=\s*"(.+?)"', html) or r1(r'"tvid":(\d*?),', html)
videoid = r1(r'#curid=.+_(.*)$', self.url) or \
r1(r'vid=([^&]+)', self.url) or \
r1(r'data-player-videoid="([^"]+)"', html) or r1(r'vid=(\w+?)\&', html) or r1(r'param\[\'vid\'\]\s*=\s*"(.+?)"', html)
r1(r'data-player-videoid="([^"]+)"', html) or r1(r'vid=(\w+?)\&', html) or r1(r'param\[\'vid\'\]\s*=\s*"(.+?)"', html) or r1(r'"tvid":(\d*?),', html)
self.vid = (tvid, videoid)
info_u = 'http://pcw-api.iqiyi.com/video/video/playervideoinfo?tvid=' + tvid
json_res = get_content(info_u)