The code is as below.
driver = webdriver.Chrome(chromedriver_path) #webdriver path
driver.get('https://webtoon.kakao.com/content/%EB%B0%94%EB%8B%88%EC%99%80-%EC%98%A4%EB%B9%A0%EB%93%A4/1781') #website access
time.sleep(2)
driver.execute_script("window.scrollTo(0, 900)") #scroll down
time.sleep(1)
However, the page does not scroll.
How can I scroll?
Page link to be scrolled
Try this
driver.execute_script("window.scrollTo(100,document.body.scrollHeight);")
Tried with the below code, it did scroll.
driver.get("https://webtoon.kakao.com/content/%EB%B0%94%EB%8B%88%EC%99%80-%EC%98%A4%EB%B9%A0%EB%93%A4/1781")
time.sleep(2)
options = driver.find_element_by_xpath("//div[@id='root']/main/div/div/div/div[1]/div[3]/div/div/div[1]/div/div[2]/div/div[1]/div/div/div/div")
driver.execute_script("arguments[0].scrollIntoView(true);",options)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With