Skip to content

获取自身微博信息 #113

@Hylan129

Description

@Hylan129

在抓取自己微博历史记录时,原程序一直抓不到,程序本身没有报错;抓取其他人的微博正常。

分析后发现微博地址更改下可用,在如下两处url后面增加“/profile",即可。
1:
def get_weibo_info(self): """获取微博信息""" try: url = 'https://weibo.cn/%s/profile' % (self.user_config['user_uri'])
2:
def get_one_page(self, page): """获取第page页的全部微博""" try: url = 'https://weibo.cn/%s/profile?page=%d' % ( self.user_config['user_uri'], page)

ps:更改成新地址后,抓取其他人的微博同样可用。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions