Невозможно щелкнуть текст «Исследовать» на сайте Google Trends с помощью Selenium Python.Python

Программы на Python
Ответить Пред. темаСлед. тема
Anonymous
 Невозможно щелкнуть текст «Исследовать» на сайте Google Trends с помощью Selenium Python.

Сообщение Anonymous »


I need to get Google Trends data for past 30 days, past 12 months like that for the purpose of my current project. I'm able to get daily data using Google Trends API. The package has another API called InterestsOverTime but Google is blocking any kind of automation effort when I try to access Explore Page Using this API, web crawling or even Selenium.

So I decided to go to the main page and then click on the Explore page But I'm failing to do so using Selenium. I'm very new to Selenium so please help me out here

This is the code I'm using

from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as ES chrome_options = Options() chrome_options.add_argument("--incognito") chrome_options.add_argument("--window-size=1920x1080") driver = webdriver.Chrome(options=chrome_options, keep_alive=True) url = "https://trends.google.com/trends/" driver.get(url) explore_button = WebDriverWait(driver,10).until( ES.visibility_of_element_located((By.XPATH,"//span[contains(text(),'Explore')]")) ) explore_button.click() I tried multiple ways to access including using wrapper APIS from Google Trends API and trying to access Explore Page using python web crawling and selenium but was not able to get it. Even trying to touch the text Explore using Selenium is not working


Источник: https://stackoverflow.com/questions/781 ... ium-python
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Python»