Open RillaKsy opened 2 years ago
python版本:3.10 Traceback (most recent call last): File "C:\Users\Sylpheed\Downloads\Google-Spider-main\Google-Spider-main\main.py", line 12, in ReRuls.clear(query) File "C:\Users\Sylpheed\Downloads\Google-Spider-main\Google-Spider-main\ReRuls.py", line 24, in clear for url in open(f'./result/{query}.txt',mode='r+',encoding='utf-8') : FileNotFoundError: [Errno 2] No such file or directory: './result/baidu.txt' 发现错误,已自动跳过
我看代码里给的mode=r+ ,得先创建文件才能r+吧
python版本:3.10 Traceback(最近一次调用):文件“C:\Users\Sylpheed\Downloads\Google-Spider-main\Google-Spider-main\main.py”,第12行,ReRuls.clear(query)文件“C:\Users\Sylpheed\Downloads\Google-Spider-main\Google-Spider-main\ReRuls.py”,第 24 行,在 open(f'./result/{query}.txt' 中清除 url ,mode='r+',encoding='utf-8') : FileNotFoundError: [Errno 2] No such file or directory: './result/baidu.txt' 发现错误,已自动跳过
我看代码里给的mode=r+,得先创建文件才能r+吧
感谢您的反馈,bug已修复
python版本:3.10 Traceback (most recent call last): File "C:\Users\Sylpheed\Downloads\Google-Spider-main\Google-Spider-main\main.py", line 12, in
ReRuls.clear(query)
File "C:\Users\Sylpheed\Downloads\Google-Spider-main\Google-Spider-main\ReRuls.py", line 24, in clear
for url in open(f'./result/{query}.txt',mode='r+',encoding='utf-8') :
FileNotFoundError: [Errno 2] No such file or directory: './result/baidu.txt'
发现错误,已自动跳过