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

[feature request]获取公众号所有文章链接 #14

Open
wanghaisheng opened this issue Jan 14, 2022 · 1 comment
Open

[feature request]获取公众号所有文章链接 #14

wanghaisheng opened this issue Jan 14, 2022 · 1 comment

Comments

@wanghaisheng
Copy link

windows客户端点选已关注公众号后,可以看到文章总数
滑动滚轮即可不断刷新文章
我看了下代码 是不是可以直接改造这个

    def getArticles(self, who, RollTimes=None):
        '''
        打开某个聊天框
        who : 要打开的聊天框好友名,str;  * 最好完整匹配,不完全匹配只会选取搜索框第一个
        RollTimes : 默认向下滚动多少次,再进行搜索
        '''
        self.UiaAPI.SwitchToThisWindow()
        RollTimes = 10 if not RollTimes else RollTimes
        def roll_to(who=who, RollTimes=RollTimes):
            for i in range(RollTimes):
                if who not in self.GetSessionList()[:-1]:
                    self.SessionList.WheelDown(wheelTimes=3, waitTime=0.1*i)
                else:
                    time.sleep(0.5)
                    self.SessionList.ListItemControl(Name=who).Click(simulateMove=False)
                    return 1
            return 0
        rollresult = roll_to()
        if rollresult:
            return 1
        else:
            self.Search(“订阅号”)
            return roll_to(RollTimes=1)

按照咱定义的roll方法 把“订阅号”当成chatwith里的who,roll应该是可以选中的,然后就是要再其中search 具体公众号名称,然后选中,又是一波滚动,文章没有的话,这个滚轮是动不了的,最后就是把文章名称 发布时间 link拿到
WeChat_xAMVeR6OyL

@cluic

@Pokoai
Copy link

Pokoai commented Aug 1, 2022

你实现了吗?@cluic

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

2 participants