GeminidSystems / GoogleNewsScraper

A Python package that scrapes Google News article data while remaining undetected by Google. Our scraper can scrape page data up until the last page and never trigger a CAPTCHA (download stats: https://pepy.tech/project/GoogleNewsScraper)
https://pypi.org/project/GoogleNewsScraper/
MIT License
10 stars 5 forks source link

Python Selenium Code Throws Errors #8

Open alexkhazzam opened 2 years ago

alexkhazzam commented 2 years ago

I am working on the following.

This method of selecting HTML elements fails to work.

'//div[@id="rso"]/div/div/div/a/div/div[2]/div[4]/p/span'

Additionally, these HTML selectors need to be updated.

driver.execute_script("""
        const menu = document.getElementById('hdtbMenus');
        menu.classList.remove('p4DDCd');
        menu.classList.add('yyoM4d');
""")
LSBispo commented 2 years ago

Hi, did u tried //*[@id="rso"] ?