Relative Content

Tag Archive for pythonselenium-webdriverweb-scraping

Selenium (Python) cannot locate element using CLASS_NAME

When the code below is run it raises this exception: selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {“method”:”css selector”,”selector”:”.match-on no-top-border “}

Selenium don’t find class

I’m trying to obtain a value from Google Shopping and have attempted to use CSS, className, and XPath.
However, nothing seems to work and it always returns an empty value. As you can see from the print, I have the exact class and CSS name, and still, I can’t get it to work. Has anyone who uses Selenium encountered something like this?

Selenium unable to click on element

I am working on a web scraping project using Selenium in Python and am encountering an issue while interacting with the Lufthansa homepage. My goal is to click a specific element (the Departure field) after accepting cookies. While accepting the cookies works fine, attempting to click the Departure field results in a TimeoutException.

How do i scrape a website whos robots.txt disallows it?

I want to webscrape data from a website for the time frame of last 10 years, the data is a pdf that i want to download that changes everyday. When i open the website normally in a browser the pdf is downloaded normally but when i try to do the same using selenium in python it gives me an error. The script works perfectly and has no errors in it itself but the pdfs dont download. The robots.txt for this website disallows webscraping for a certain area of the website (for ex. Market data) but the url i open using the driver doesnt have market data in it but the tab is already selected when i open the url.