Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问爬虫中的关键词搜索,可以对时间段进行限定吗? #3

Closed
ImbaPlayer opened this issue Feb 18, 2021 · 8 comments
Closed

Comments

@ImbaPlayer
Copy link

No description provided.

@CharesFang
Copy link
Owner

额,暂时还没有实现这个功能,不过微博倒是提供了这个接口的

@ydam24
Copy link

ydam24 commented Mar 28, 2022

额,暂时还没有实现这个功能,不过微博倒是提供了这个接口的
@CharesFang
请问 m.weibo.cn 有这样的接口吗?

@CharesFang
Copy link
Owner

额,暂时还没有实现这个功能,不过微博倒是提供了这个接口的
@CharesFang
请问 m.weibo.cn 有这样的接口吗?

有的,之前在m站点爬去,你可以在手机上寻找一下这个功能然后分析API

@ydam24
Copy link

ydam24 commented Mar 28, 2022

安卓手机端好像没有找到限制时间段的功能,大佬能不能截图看一下...

https://github.com/CharesFang/WeiboSpider/blob/v1.0/WeiboSpider/spiders/KeyWordsSpider.py
还有就是请问1.0版本这里是用display_time 限制时间吗?但是设置为3.27 00:00 (即display_time=) 所返回的结果 第一页开始时间 不为3.27 00:00 最后一页结束时间 也不为3.27 00:00 ,而是从time.now()3.26的结果都有

请问使用display_time限制时间段吗?如果是的话限制的到底是开始时间还是结束时间?不是的话有其他参数控制吗?

对了新的app中使用的是新的接口,display_time似乎变成了ul_ctime但修改后还是同样的结果

@ydam24
Copy link

ydam24 commented Mar 28, 2022

@CharesFang

@CharesFang
Copy link
Owner

安卓手机端好像没有找到限制时间段的功能,大佬能不能截图看一下...

https://github.com/CharesFang/WeiboSpider/blob/v1.0/WeiboSpider/spiders/KeyWordsSpider.py 还有就是请问1.0版本这里是用display_time 限制时间吗?但是设置为3.27 00:00 (即display_time=) 所返回的结果 第一页开始时间 不为3.27 00:00 最后一页结束时间 也不为3.27 00:00 ,而是从time.now()3.26的结果都有

请问使用display_time限制时间段吗?如果是的话限制的到底是开始时间还是结束时间?不是的话有其他参数控制吗?

对了新的app中使用的是新的接口,display_time似乎变成了ul_ctime但修改后还是同样的结果

  1. v1.0的代码我已经记不得啥样的了,当时也不太会写代码写得有点乱,直接看master branch上就好。
  2. https://github.com/CharesFang/WeiboSpider/blob/v1.0/WeiboSpider/spiders/KeyWordsSpider.py#L24-L31 这一块儿是根据关键字获取对应文本的接口,display_time这几个参数我没有做分析。
  3. 刚刚参考了一下WeiboSpider的issue,微博高级搜索功能已经关闭,看起来无法根据时间爬数据了。See issue here

@CharesFang CharesFang reopened this Mar 29, 2022
@ydam24
Copy link

ydam24 commented Mar 30, 2022

目前来看应该是没有办法在weibo.cnm.weibo.cn高级搜索了
现在只有weibo.com有这个功能了,还必须登录才能看到第一页之外的数据。。。。

@CharesFang
Copy link
Owner

或者可以搜索一下其他project里有无相关API,微博可能只是屏蔽了调用接口,如果能找到API说不定OK。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants