无法用Python打开Instagram追随者页面



我需要用Python打开Instagram追随者页面。我已经尝试了好几种方法,但都没有效果。有人能帮帮我吗?首先,我尝试这样做:

# Go to the Group
driver.get('https://www.instagram.com/biblio_com/')
time.sleep(5)
driver.find_element_by_xpath('//a[@href="/biblio_com/followers/"]').click()

但是给出了一个错误:

selenium.common.exceptions.ElementNotInteractableException: Message: Element <a class=" _81NM2" href="/biblio_com/followers/"> could not be scrolled into view

然后我尝试了以下操作:

# WebDriverWait(driver, 100).until(EC.element_to_be_clickable((By.XPATH, '//a[@href="/biblio_com/followers/"]'))).click()

但是它给出了相同的错误…(((另一种解决方法是:

followers_link = driver.find_element_by_xpath('//a[@href="/biblio_com/followers/"]')
ActionChains(driver).move_to_element(followers_link).click(followers_link).perform()

没有错误。但它也没有给出结果……有人能帮我一下吗?

driver.find_element_by_xpath('//a[@href="/biblio_com/followers/"]').click()

我尝试了chromedriver,对我来说它正在工作。您使用的是什么浏览器?

最新更新