I'm creating a script using Python selenium for scraping instagram user post. if user have a 62 post, I want get all of 62 post.
I tried to scroll down until all post loaded and get element/post using xpath and its works. but only 29 element/post, not all of 62 element/post.
driver.get("https://instagram.com/celmirashop/")
#scroll until all post loaded
scroll()
wait = WebDriverWait(driver, 15)
wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "div.eLAPa")))
time.sleep(30)
#getting list cards of posts
list_cards = driver.find_elements_by_xpath("//*[@class='v1Nh3 kIKUG _bz0w']")
print(len(list_cards))
if user have 62 post, I want get element of 62 (all) post