LifeActor / ykdl

a video downloader focus on China mainland video sites.(一款专注于中国大陆视频网站的视频下载器。)
https://github.com/LifeActor/ykdl
Other
1.45k stars 285 forks source link

iqiyi部分视频解析报错 #616

Closed karma-sun closed 2 years ago

karma-sun commented 2 years ago

iqiyi部分视频解析报错

请将错误输出粘贴在下面:

ykdl -i --debug https://www.iqiyi.com/v_27bc0jp2es4.html
DEBUG:ykdl.common:host> www.iqiyi.com
DEBUG:ykdl.common:short_name> iqiyi
DEBUG:ykdl.util.http:get_response> URL: https://www.iqiyi.com/v_27bc0jp2es4.html
DEBUG:YKDL:'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "C:\Python39\lib\site-packages\ykdl-1.8.1.post1-py3.9.egg\cykdl\__main__.py", line 323, in main
    for rc in map(handle_video, args.video_urls):
  File "C:\Python39\lib\site-packages\ykdl-1.8.1.post1-py3.9.egg\cykdl\__main__.py", line 228, in handle_video
    info = parser(u)
  File "C:\Python39\lib\site-packages\ykdl-1.8.1.post1-py3.9.egg\ykdl\extractor.py", line 37, in parser
    info = self.prepare()
  File "C:\Python39\lib\site-packages\ykdl-1.8.1.post1-py3.9.egg\ykdl\extractors\iqiyi\video.py", line 154, in prepare
    get_vid()
  File "C:\Python39\lib\site-packages\ykdl-1.8.1.post1-py3.9.egg\ykdl\extractors\iqiyi\video.py", line 151, in get_vid
    info.title = '-'.join(match1(html, '<title>([^<]+)').split('-')[:-3])
AttributeError: 'NoneType' object has no attribute 'split

如果你有其他附言,例如问题只在某个视频发生,或者是一般性讨论或者提出新功能,请在下面添加:

[在这里输入内容文本]

SeaHOH commented 2 years ago

刚才简单试了几次,发现所有携带 Linux 字样的用户代理 (User-Agent) 都被阻止了,可能需要浏览器环境才能通过验证。 现在简单改成 Windows 7,不做大的折腾。