dataabc / weiboSpider

新浪微博爬虫,用python爬取新浪微博数据
8.37k stars 1.98k forks source link

运行出错 #197

Closed fangshu1999 closed 3 years ago

fangshu1999 commented 4 years ago

为了更好的解决问题,请认真回答下面的问题。等到问题解决,请及时关闭本issue。

dataabc commented 4 years ago

感谢反馈。

你的config.json应该是旧的,现在有增加了很多配置(https://github.com/dataabc/weiboSpider/blob/master/weibo_spider/config_sample.json),包括end_date,更新项目源代码就可以了。

如果还有问题欢迎继续讨论

zzfiu commented 4 years ago

我运行python3 -m weibo_spide后 没有反应

dataabc commented 4 years ago

@zzfiu

感谢反馈。

可能你本地只有python3一个版本,可以运行

$ python -m weibo_spider

如果还有问题,欢迎继续讨论

zzfiu commented 4 years ago

C:\Users\Administrator\AppData\Local\Programs\Python\Python38\python.exe: No module named weibo_spider 出现这个

dataabc commented 4 years ago

@zzfiu

你应该在weiboSpider目录下运行这个命令,就是cd到weiboSpider目录,然后运行命令python -m weibo_spider

songzy12 commented 4 years ago

感谢反馈。

你的config.json应该是旧的,现在有增加了很多配置(https://github.com/dataabc/weiboSpider/blob/master/weibo_spider/config_sample.json),包括end_date,更新项目源代码就可以了

如果还有问题欢迎继续讨论

如果之前已经运行并生成过程序的话只通过 git pull 来更新源代码似乎还不足够, 因为当前目录下已经生成过 config.json 的话并不会去覆盖已有的 config.json,需要

  1. 自己手动去现有的 config.json 里添加新的 key,或者
  2. 删掉现有的 config.json 然后让程序把 config_sample.json 再 copy 出一遍

当前如果并不是通过 git pull 更新而是直接重新下载了新的软件包的话等价于上面的 2.

dataabc commented 4 years ago

@songzy12

是的,考虑过加个提示,一旦出现上面的错误,就提示使用者更新config,只是觉得参数更新不频繁,出现上述问题的概率不高,就没有添加。

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

Closing as stale, please reopen if you'd like to work on this further.