IshtarTang / lofterSpider

lofter的爬虫,爬所有点过的喜欢/推荐/tag、爬取个人主页。
146 stars 17 forks source link

你好,新版的运行报错了(N久以前用过一次旧版能正常运行) #14

Open Junru-Lee opened 1 week ago

Junru-Lee commented 1 week ago

"D:\Python 3.12.4\python.exe" D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:43: SyntaxWarning: invalid escape sequence '.' data['c0-param2'] = 'number:' + str(re.search('s%d.time=(.);s.type' % (query_num - 1), page_data).group(1)) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:143: SyntaxWarning: invalid escape sequence '\d' param0 = re.search("pid=(\d+)&bid=", referer_url).group(1) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:175: SyntaxWarning: invalid escape sequence '\d' comm_sid = re.search("(s\d+).appVersion", comm_info).group(1) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:177: SyntaxWarning: invalid escape sequence '.' comm_content = re.search(comm_sid + '.content="(.?)";', comm_info).group(1) \ D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:180: SyntaxWarning: invalid escape sequence '.' comm_publish_time = re.search(comm_sid + '.publishTime=(\d+);', comm_info).group(1) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:184: SyntaxWarning: invalid escape sequence '.' publisher_sid = re.search(comm_sid + ".publisherMainBlogInfo=(.?);", comm_info).group(1) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:186: SyntaxWarning: invalid escape sequence '.' re_publisher_nickname = re.search(publisher_sid + '.blogNickName="(.?)";', comm_info) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:188: SyntaxWarning: invalid escape sequence '.' re_publisher_nickname = re.search(publisher_sid + '.blogNickName="(.?)";', all_comm_str) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:192: SyntaxWarning: invalid escape sequence '.' re_publisher_blogname = re.search(publisher_sid + '.blogName="(.?)";', comm_info) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:194: SyntaxWarning: invalid escape sequence '.' re_publisher_blogname = re.search(publisher_sid + '.blogName="(.?)";', all_comm_str) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:199: SyntaxWarning: invalid escape sequence '.' reply_blogsid = re.search(comm_sid + ".replyBlogInfo=(.?);", comm_info).group(1) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:201: SyntaxWarning: invalid escape sequence '.' re_reply_nickname = re.search(reply_blogsid + '.blogNickName="(.?)";', comm_info) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:203: SyntaxWarning: invalid escape sequence '.' re_reply_nickname = re.search(reply_blogsid + '.blogNickName="(.?)";', all_comm_str) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:206: SyntaxWarning: invalid escape sequence '.' re_reply_blogname = re.search(reply_blogsid + '.blogName="(.?)";', comm_info) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:208: SyntaxWarning: invalid escape sequence '.' re_reply_blogname = re.search(reply_blogsid + '.blogName="(.?)";', all_comm_str) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:223: SyntaxWarning: invalid escape sequence '\d' illustration = re.findall('"(http[s]{0,1}://imglf\d{0,1}.lf\d.[0-9]{0,3}.net.?)"', content.decode("utf-8")) D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:227: SyntaxWarning: invalid escape sequence '\d' illustration = re.findall('"(http[s]{0,1}://imglf\d.nosdn\d.[0-9]{0,3}\d.net.*?)"', D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py:230: SyntaxWarning: invalid escape sequence '\d' ''' Traceback (most recent call last): File "D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py", line 481, in run(author_url, login_key, login_auth, get_comm, additional_break, start_time, end_time, chapter_merge_title, File "D:\Downloads\lofterSpider-master\lofterSpider-master\l9_author_txt.py", line 278, in run author_id = author_page_parse.xpath("//body//iframe[@id='control_frame']/@src")[0].split("blogId=")[1]


IndexError: list index out of range

Process finished with exit code 1
Junru-Lee commented 1 week ago

run的是l4和l9,用了lofter上随便找的不同的作者主页都是报这个错。

Junru-Lee commented 1 week ago

把登陆方式换成手机号登陆之后没有报错了。之前用的是QQ