-
Notifications
You must be signed in to change notification settings - Fork 2k
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
refactor: 获取原创微博长内容修改为接口调用 #406
base: master
Are you sure you want to change the base?
Conversation
|
||
logger = logging.getLogger('spider.comment_parser') | ||
|
||
|
||
class CommentParser(Parser): | ||
def __init__(self, cookie, weibo_id): | ||
self.cookie = cookie | ||
self.weibo_id = weibo_id | ||
self.url = 'https://weibo.cn/comment/' + weibo_id | ||
self.selector = handle_html(self.cookie, self.url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢贡献,selector这一行没有用到,建议删除。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
帮看下 22 行是不是用到了 self.weibo_id,我当时不加这个 ide 报错,没怎么写过 python 找猫化虎改的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是16行selector相关的,它没有用到,可以去掉。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
明白了,已删除。
不太清楚这个变更对老用户会产生多大影响,请酌情合并,如果有人能在这个基础上完善就更好了。 |
感谢贡献,刚发现现在的代码无法正确获取长转发,因为之前是解析的网页,现在原创微博改成了接口,转发没有修改。 |
No description provided.