Python selenium检索instagram追随者

Python selenium检索instagram追随者,python,selenium-webdriver,Python,Selenium Webdriver,我正在尝试使用selenium(在使用用户名和pwd进行身份验证后)这样的代码从我的帐户获取追随者列表: 问题是变量“r”是“None”。访问您自己的关注者是否有问题?单击方法不返回任何内容,因此…r为none driver.get("https://www.instagram.com/{0}/".format(account)) # Click the 'Follower(s)' link r=driver.find_element_by_partial_link_text("followe

我正在尝试使用selenium(在使用用户名和pwd进行身份验证后)这样的代码从我的帐户获取追随者列表:


问题是变量“r”是“None”。访问您自己的关注者是否有问题?

单击方法不返回任何内容,因此…r为none

driver.get("https://www.instagram.com/{0}/".format(account))

# Click the 'Follower(s)' link
r=driver.find_element_by_partial_link_text("follower").click()
print r
# Wait for the followers modal to load
xpath = "//div[@style='position: relative; z-index: 1;']/div/div[2]/div/div[1]"
WebDriverWait(driver, 10).until(
    EC.presence_of_element_located((By.XPATH, xpath)))

# You'll need to figure out some scrolling magic here. Something that can
# scroll to the bottom of the followers modal, and know when its reached
# the bottom. This is pretty impractical for people with a lot of followers

# Finally, scrape the followers
xpath = "//div[@style='position: relative; z-index: 1;']//ul/li/div/div/div/div/a"
followers_elems = driver.find_elements_by_xpath(xpath)