I want to check with a boolean request, if there is a picture on the website: https://portal.dnb.de/opac/mvb/cover?isbn=9783442472352 or not: https://portal.dnb.de/opac/mvb/cover?isbn=3499239663 I don`t know how that is possible. Thank you for your help!! Answer Looks like you should deal with response status – for selenium, take a read: How to get status code by using selenium.py (python code) Alternative approach, get
Tag: selenium
Replace span tags with whitespace or parse contents as new column with pandas.read_html
I want to scrape Congressional stock trades from Capitol Trades. I can scrape the data, but the column that contains stock tickers has a span tag that separates company names from company tickers. pandas.read_html() removes this span tag, which concatenates company names and tickers and makes it difficult to recover tickers. For example, company names that end with an “INC”
Selenium Python .click() not working on one element
So, I am trying to make a simple project that simply just auto clicks all the details to fill out a form to get ready to post. It works perfectly up until just one element. There are 2 very similar elements; ones a category and the other is a sub-category. It states its unable to find the element, I’m fairly
NameError: name ‘fetch’ is not defined in Selenium Console
Hi I am trying to open Selenium, visit a URL then use driver.execute_script to send a fetch request via Console in Chrome Developer Tools within the Selenium window. However when I run it, the Selenium window opens up, visits the page, but when it gets to the execute_script section, it comes up with: ‘NameError: name ‘fetch’ is not defined’. How
find_element(By.CLASS_NAME…) InvalidSelectorException
I need to navigate to the object with special class, that changes every page refresh So i decided to use bs to find the element class, that works, but selenium raises an exception about invalid selector. class is existing, i can find it in page source. There are some spaces at the beginning and at the ending of class name
Why selenium is not starting next url after quiting the previous url
Actully I’m working on some URLs. URLs are store in my database while picking one by one and looking for it resources and storing that resources in a database. if I do this with out using driver.quit() somehow for everyurl it store information from the beginning so I decide to use driver.quit now it work only for the first URL
How do I stop my scraper from hitting an error whenever it clicks the next button?
Hello so i’m trying to scrape next page on google shopping website. But i get an error whenever my scraper clicks the next button. It stops working when it loads the next page. Here’s my codeblock next_page = driver.find_element(By.XPATH, ‘//*[@id=”pnnext”]’) next_page.click() HERE’S THE ERROR I GET Traceback (most recent call last): File “c:UsersLPDocumentspythonwedgwoodwedgwood.py”, line 50, in name = card.find_element(By.CLASS_NAME, ‘OSrXXb’).text.strip()
Scraping data through changing Xpaths
I can’t figure out how to scrape data, I am trying to scrape the product name, price and other information from the website, the product names are easy to access as they have similar xpath with only one tag that changes but for the prices the there are multiple changes to the tags.Is there an alternative to how I can
How do I select pseudo-elements in python with Selenium?
These two elements have the exact same attributes except for the text in the pseudo-element. Is there anyway I can click on the “Practical” element. I’ve tried the following to no avail: Answer Pseudo elements are not elements. So, that ::before seems to be just a kind of text content of div element. I can’t give you tested answer since
locate an a element and click on it in selenium pyhton
I have this page and I want to click on the a element that sends an email(the one that is highlighted in the screenshot below and I have tried to find this element using By.XPATH email = driver.find_element(By.XPATH, “//a[contains(@class, ’email-old-32′)]”).click() and By.CLASS_NAME email = driver.find_element(By.CLASS_NAME, ’email-old-32′).click() and in both situations i’m getting an error no such element, does anyone know