Relative Content

Tag Archive for selenium-webdriverweb-scraping

issues while webscraping Kickstarter

from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC chromedriver = “C:\Users\xxx\Downloads\chromedriver-win32\chromedriver.exe” options = Options() options.add_argument(“–headless”) # Run in headless mode options.add_argument(“–disable-gpu”) service = Service(chromedriver) driver = webdriver.Chrome(service=service, options=options) url = “https://www.kickstarter.com/projects/owensrakukiln/the-laguna-clay-raku-kiln-for-owen/description” driver.get(url) try: story_section = WebDriverWait(driver, 20).until( […]

Issues with Venue Listing Script

I wrote a script to list the venues of a city from a website. However, I encountered two issues that I don’t know how to solve:

Locating elements by CSS selector with Selenium

I am trying to scrape some golf data from this page on the PGATour website using Seleniun 3.141.0 in Python 3.12.4. I’m having trouble selecting a paragraph element in the overview section near the top of the page listing the course location (Blaine, Minnesota). Here is my code:

Issue scraping tables with nested trs

Scraping data from collapsable tables using selenium, there are two tables where the structure differs: there are rows inside another tr. I want to access tds by index. However, this code first outputs those tables fully, then thrice the indices.

Web scraping with selenium and having trouble clicking on links

I’m using selenium to web scrape from this website because it gets blocked when I use beautiful soup. The link that I want to click is highlighted in the screenshot, and its html code is highlighted on the right when I inspect element. I copied the xpath for that part of the html code. But then when I try to click the link using link.click() it says that I can’t do it because it is a ‘list’ object. I also can’t print it or do anything else with it like .get_attribute(‘href’). Please let me know if you have any advice for fixing this specific issue or if I should go about it another way!