Scrolling Instagram Followers Not Working

27 views Asked by At

I am trying to scrape my instagram followers, but I am having issues with the scrolling mechanism to load more followers.

  dialog_box = WebDriverWait(driver, 10).until(
    EC.presence_of_element_located((By.XPATH, "(//div[@class='_aano'])[1]/div[1]"))
  )
  driver.execute_script("arguments[0].scrollTop = arguments[0].scrollHeight", dialog_box)

The element is being correctly located, but the scrolling script is not doing anything. Any suggestions?

Note: the XPATH is locating the div whose height actually changes upon scroll. It is not the dialog box element, which I have already tried and it did not work.

0

There are 0 answers