Instagram-如何以编程方式滚动以加载关注者/关注对象

问题描述 投票:0回答:1

我正在努力从Instagram(IG)个人资料页面获取所有关注者/关注者列表。我正在使用CefSharp.WinForms(C#),并且在加载IG页面后,我使用CefSharp.WinForms中的ExecuteScriptAsync(“ ...”)成功注入了jQuery。

使用$('div [role =“ dialog”]')我可以访问Instagram的关注者弹出窗口(div),一旦单击关注者链接,该窗口就会显示。

不幸的是,我没有找到正确的方法来模拟滚动/滚轮滚动等,一旦滚动到最后一个当前列表,该滚动/ div滚动会触发该div加载更多的关注者。

有什么想法吗?特技?码? (最好使用jQuery,但也可以是dom / js本机)

enter image description here

javascript jquery cefsharp
1个回答
0
投票

尝试一下:

jQuery('#elementId').bind('scroll', function() {
    if (jQuery(this).scrollTop() + jQuery(this).innerHeight() >= jQuery(this)[0].scrollHeight) {
        //code to get followers list
    }
});
© www.soinside.com 2019 - 2024. All rights reserved.