jxxghp / MoviePilot-Plugins

MoviePilot官方插件市场
GNU General Public License v3.0
148 stars 215 forks source link

错误:Jackett 聚合 Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration. #349

Closed junyuyuan closed 2 months ago

junyuyuan commented 2 months ago

image

image

自用Jackett聚合搜索插件,能返回数据,但是MP报warning,新手摸不着头脑,求助各位大佬。

image

so1ve commented 2 months ago

大概是编码或者格式问题吧,问题不大

Pramy commented 2 months ago

返回的是TorznabXml,使用html解析器来解析会出错

junyuyuan commented 2 months ago

这个返回格式我能通过什么方式修改一下么?

Pramy commented 2 months ago

试了一下,如果去掉头部 <?xml version="1.0" encoding="UTF-8"?> 这一行,pyquey还是能当成xml解析的,原因应是之前请求回来的内容已经使用chardet来解码成str了,这样子传入pyquey中就会报错了,所以要删除声明这一段,否则就要传一个bytes进去

junyuyuan commented 2 months ago

我试了一下,把浏览器仿真打开之后就不报warning了。。 image siteoper.add(接口里面哪个参数是默认打开站点仿真的? image

junyuyuan commented 2 months ago

添加render后默认开启仿真就不报waring了。。感谢各位指点,我继续看看为啥没有搜索数据去了~