weishen250 / Google-Spider

谷歌爬虫,自动解析谷歌搜索信息,需搭配clash使用,生成cvs
59 stars 16 forks source link

无法使用 #1

Open RillaKsy opened 2 years ago

RillaKsy commented 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' 发现错误,已自动跳过

RillaKsy commented 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+吧

weishen250 commented 2 years ago

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已修复