im trying to scrape images from a dynamically loading infinite scroll website (https://scrolller.com/) I'm trying to get the data from all the tgs "with vertical-view__media" class
this is where im at right now
import requests
import os
from selenium.webdriver import Chrome
import time
def launchBrowser():
link = 'https://scrolller.com'
driver = Chrome(executable_path='C:/seleniumdrivers/chromedriver')
driver.get(link)
time.sleep(4)
previous_height = driver.execute_script('return document.body.scrollHeight')
while True:
driver.execute_script('window.scrollTo(0, document.body.scrollHeight);')
time.sleep(4)
new_height= driver.execute_script('return document.body.scrollHeight')
if new_height == previous_height:
break
img =driver.find_elements_by_class_name('vertical-view__media')
print(img)
while(True):
pass
launchBrowser()
my goal is to get all the image links and download them so the website scrolls image links gets scraped and downloaded