SHARE
TWEET

Untitled

a guest Feb 21st, 2020 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from selenium import webdriver
  2. from selenium.webdriver.common.by import By
  3. from selenium.webdriver.support.ui import WebDriverWait
  4. from selenium.webdriver.support import expected_conditions as EC
  5. from selenium.common.exceptions import TimeoutException
  6. from selenium.webdriver.common.action_chains import ActionChains
  7. from selenium.webdriver.common.keys import Keys
  8. import time
  9.  
  10. driver = webdriver.Chrome(executable_path='chromedriver.exe')
  11. driver.get('https://reviews.femaledaily.com/products/mask/nose-pack/biore/pore-pack?cat=&cat_id=0&age_range=&skin_type=&skin_tone=&skin_undertone=&hair_texture=&hair_type=&order=newest&page=1')
  12. #driver.execute_script("window.scrollBy(0, document.body.scrollHeight)")
  13.  
  14. while(!find_element_by_css_selector('a#next-page.paging-prev-inactive):
  15. driver.execute_script("window.scrollTo(0,document.body.scrollHeight)")
  16. #time.sleep(3)
  17. act = ActionChains(driver)
  18. act.click(driver.find_element_by_xpath('//*[@id="id_next_page"]')).perform()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top