How to click on Load More button within Google Trends and print all the titles through Selenium and Python

前端 未结 4 1970
耶瑟儿~
耶瑟儿~ 2020-12-12 02:02

this time I would like to click a button in order to load more real-time searches. Here is the link of the website:

https://trends.google.com/trends/trendingsearches

4条回答
  •  盖世英雄少女心
    2020-12-12 02:42

    You can use this:

    wait = WebDriverWait(webdriver, 10)
    load_button = wait.until(EC.presence_of_element_located((By.XPATH, "//div[@class = 'feed-load-more-button']")))
    load_button.click()
    

提交回复
热议问题