Comments (5)
需要在page_parser.py修改get_one_weibo方法,你好像只是实现了有获取能力的方法,但是没有使用,需要在get_one_weibo中使用这个方法。
from weibospider.
需要在page_parser.py修改get_one_weibo方法,你好像只是实现了有获取能力的方法,但是没有使用,需要在get_one_weibo中使用这个方法。
感谢回复🙏 现在可以写入获取到的链接了,但是没有链接时写入的是空白,而不是“无”。
请问还需要改哪里吗?
from weibospider.
需要在page_parser.py修改get_one_weibo方法,你好像只是实现了有获取能力的方法,但是没有使用,需要在get_one_weibo中使用这个方法。
感谢回复🙏 现在可以写入获取到的链接了,但是没有链接时写入的是空白,而不是“无”。
请问还需要改哪里吗?
听从了Chatgpt的建议,在 def get_video_page_url(self, info) 中 添加:
if video_page_url == '': video_page_url = u'无'
现在可以写入 无 了。
一开始想不明白为什么 get_video_page_url(self, info) 需要再赋值,刚才突然想到,如果链接不存在的话,
video_page_url = CommentParser(self.cookie, weibo_id).get_video_page_url()
这里生成应该是空白,所以就写入空白?
考虑到视频原url过期后就打不开了,而视频页面url,只要微博未删除,即便设置了“仅半年可见”,也是可以通过自己发布 正文为页面url 的微博 来看到视频的;要不要考虑一下把原本写入视频url改为视频页面url呢?
from weibospider.
暂时没有这个打算。
from weibospider.
暂时没有这个打算。
好吧。感谢大神的开发和指导❤️
from weibospider.
Related Issues (20)
- 视频播放量 HOT 1
- 视频爬取失败 HOT 3
- 关于main函数调用 HOT 1
- nickname报错 HOT 3
- 报错一大堆 HOT 2
- 微博长文“展开”更多,无法获取完整长文内容 HOT 2
- 通过POST方式将数据推送到自定义接口 HOT 1
- 随机等待时长已经加到非常长了,但还是会在相似的页数被封禁 HOT 3
- 报错During handling of the above exception, another exception occurred HOT 1
- 如果只想要微博用户的个人信息,如性别,生日等,但不想要其微博信息,需要怎么做啊? HOT 1
- 程序运行__main___出错 HOT 5
- 关于获取到的粉丝数 HOT 2
- 无法使用'NoneType' object has no attribute 'nickname',尝试过更换COOKIE HOT 2
- 爬取用户信息时报错List out of range 但是爬取微博时正常 HOT 3
- 部分ID爬取错误 HOT 1
- 我是小白,请问怎么爬取微博全网内容,关键词怎么设置 HOT 4
- 能否增加抓取精选评论数 HOT 1
- 想请教一下原始图片url怎么利用 HOT 1
- 运行出错,无法连接 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weibospider.