xjasonlyu / 98tang_daysign

98tang Daysign Script
MIT License
55 stars 34 forks source link

青龙运行报错 TypeError: object of type 'NoneType' has no len() #23

Closed KyleLyric closed 4 months ago

KyleLyric commented 4 months ago

大佬这个错误咋解决,青龙面板运行的 comment to: tid = 2066602, message = 這系列真有戲 /ql/data/scripts/qd/daysign.py:102: XMLParsedAsHTMLWarning: It looks like you're parsing an XML document using an HTML parser. If this really is an HTML document (maybe it's XHTML?), you can ignore or filter this warning. If it's XML, you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the lxml package installed, and pass the keyword argument features="xml" into the BeautifulSoup constructor. soup = BeautifulSoup(r.text, 'lxml') Traceback (most recent call last): File "/ql/data/scripts/qd/daysign.py", line 180, in main raw_html = daysign(cookies=cookies) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/ql/data/scripts/qd/daysign.py", line 103, in daysign root = BeautifulSoup(soup.find('root').string, 'html.parser') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/bs4/init.py", line 315, in init elif len(markup) <= 256 and ( ^^^^^^^^^^^ TypeError: object of type 'NoneType' has no len() 错误原因:object of type 'NoneType' has no len()

KyleLyric commented 4 months ago

已解决,感谢大佬