dataabc / weiboSpider

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

pycharm运行main.py时出错 #294

Closed jasmine-1026 closed 3 years ago

jasmine-1026 commented 3 years ago

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

error: no commands supplied

dataabc commented 3 years ago

感谢反馈。

你可以在console上直接运行

$ python3 -m weibo_spider
jasmine-1026 commented 3 years ago

直接运行没有json文件出现。请问一下还有其他方法吗?

---原始郵件--- 寄件人: "Chen Lei"<notifications@github.com> 傳送時間: 2021年1月28日(週四) 晚上10:09 收件人: "dataabc/weiboSpider"<weiboSpider@noreply.github.com>; 抄送: "jasmine-1026"<351390139@qq.com>;"Author"<author@noreply.github.com>; 主旨: Re: [dataabc/weiboSpider] pycharm运行main.py时出错 (#294)

感谢反馈。

你可以在console上直接运行 $ python3 -m weibo_spider
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

dataabc commented 3 years ago

可能有json,只是你没发现,第一次运行会生成json,并且提示配置json。

直接用命令行工具运行python3 -m weibo_spider就可以

jasmine-1026 commented 3 years ago

请问生成一般是在哪个文件夹下呢?我还是没有找到。 然后想顺便请教一下如果爬取用户首页的话是不是要模拟登录呀?我直接爬的时候解码会有错误而且内容和网页直接查看的不太一样。请问你们遇到过这种情况吗?

---原始郵件--- 寄件人: "Chen Lei"<notifications@github.com> 傳送時間: 2021年1月28日(週四) 晚上11:52 收件人: "dataabc/weiboSpider"<weiboSpider@noreply.github.com>; 抄送: "jasmine-1026"<351390139@qq.com>;"Author"<author@noreply.github.com>; 主旨: Re: [dataabc/weiboSpider] pycharm运行main.py时出错 (#294)

可能有json,只是你没发现,第一次运行会生成json,并且提示配置json。

直接用命令行工具运行python3 -m weibo_spider就可以

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

dataabc commented 3 years ago

在命令行目录下生成,如果你是在weiboSpider目录下运行的就在weiboSpider目录下生成。一般第一次运行,会显示生成位置。

是需要cookie的。和浏览器操作一样,因为浏览器浏览是需要登录的,如果你不想使用cookie,可以使用免cookie版

jasmine-1026 commented 3 years ago

那如果刚运行得到的cookie放进去之后显示cookie错误或已过期,请问应该怎么解决呢?

------------------ 原始邮件 ------------------ 寄件人: Chen Lei <notifications@github.com> 发送时间: 2021年1月29日 13:43 收件人: dataabc/weiboSpider <weiboSpider@noreply.github.com> 抄送: jasmine-1026 <351390139@qq.com>, Author <author@noreply.github.com> 主旨: 回覆:[dataabc/weiboSpider] pycharm运行main.py时出错 (#294)

在命令行目录下生成,如果你是在weiboSpider目录下运行的就在weiboSpider目录下生成。一般第一次运行,会显示生成位置。

是需要cookie的。和浏览器操作一样,因为浏览器浏览是需要登录的,如果你不想使用cookie,可以使用免cookie版。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

dataabc commented 3 years ago

说明cookie是无效的,也可能修改错了json文件,应该修改config.sjon,不知道修改的是不是这个。

jasmine-1026 commented 3 years ago

请问什么情况会导致cookie无效呢

---原始郵件--- 寄件人: "Chen Lei"<notifications@github.com> 傳送時間: 2021年1月29日(週五) 下午3:02 收件人: "dataabc/weiboSpider"<weiboSpider@noreply.github.com>; 抄送: "jasmine-1026"<351390139@qq.com>;"Author"<author@noreply.github.com>; 主旨: Re: [dataabc/weiboSpider] pycharm运行main.py时出错 (#294)

说明cookie是无效的,也可能修改错了json文件,应该修改config.sjon,不知道修改的是不是这个。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

dataabc commented 3 years ago

就是cookie无效啊

stale[bot] commented 3 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.