我用python编写了以下程序,它可以读取Instagram账户的1390680个URLS列表,并获取每个用户的关注者数量。它利用了安装程序。代码如下:
import pandas as pd
from instaloader import Instaloader, Profile
# 1. Loading in the data
# Reading the data from the csv
data = pd.read_csv('IG_Audience.csv')
# Getting the profile urls
urls = data['Profile URL
我正在尝试让所有我关注的人都使用Instagram API。调用一次返回50个用户,我正在分页存储每个关注者。我关注了500个人,但总共只收到了150个。会出什么问题呢?
# returns a list of ids
def find_users_we_follow():
ids = []
followed_users = IGapi.user_follows(CLIENT_ID, as_generator=True)
# IG returns 50 users at a time which we have to paginate through
for p
你好!我想遍历instagram上的所有追随者列表,但是它只给了我最初的13个元素!为什么会发生这种事?
abc = driver.find_elements_by_xpath('//div[@class="_7UhW9 xLCgt qyrsm uL8Hv T0kll "]')
for i in abc:
if i.text == 'Follow':
driver.execute_script("arguments[0].click();", i)
我为instagram写了一个脚本。我需要一个返回关注者列表的方法。我的追随者是不可见的(只有10个),我必须向下滚动页面。我正在使用selenium webdriver和python来自动化这个过程。但不幸的是它不能滚动down.Here是我的代码
def get_followers(self):
try:
driver.find_elements_by_css_selector('a._t98z6')[0].click()
except Exception as e:
print("Sorry, i don