EBAY Price Tracking with Python, Beautifulsoup and Requests
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they are following when they ask why their eBay or similar BeautifulSoup scraper returns no results or breaks after site changes.
Recommended by 1 people across 1 different months, 2021 to 2023.
What it is
A roughly 20-minute Python tutorial by John Watson Rooney on building an eBay price tracker that scrapes sold listings with requests and BeautifulSoup, then loads the results into pandas. It walks through fetching a page, parsing result divs and extracting fields.
What people said
Recommends WeirdlyForgetfulDuck · 2021-12 · Stack Overflow · on “Unable to Pull Data from Ebay Scraper Tutorial - Getting AttributeError”
I'm currently following a tutorial to create an Ebay Scraper from the following link: [this video] I'm mid-way through the code and suddenly notice two things about my code: import requests from bs4 import BeautifulSoup import pandas as pd url = ' [LINK] LH_Complete=1' def get_data(url): r = requests.get(url) soup = BeautifulSoup(r.text, 'html.parser') return soup def parse(soup): results = soup.find_all('div', {'class': 's-item__info clearfix'}) print(len(results)) return soup = get_data(url) parse(soup) The above code gives me 0 results while: import requests from bs4 import BeautifulSoup import pandas as pd url = ' [LINK] ' def get_data(url): r = requests.get(url) soup = BeautifulSoup(r.text,
Cites SicSemper · 2021-05 · Stack Overflow · on “How can I return multiple instances of the same span within one div?”
I'm looking at this site [LINK] . What I'm trying to do is to create a .csv that has columns for the away team, away starter, away pitcher handedness, and then individual columns for each away batter and each away batter's handedness -- and then the same for the home teams. Here's what I have so far, based off this tutorial [this video] : import requests from bs4 import BeautifulSoup import pandas as pd from csv import reader url = ' [LINK] ' def get_data(url): r = requests.get(url) soup = BeautifulSoup(r.text, 'html.parser') return soup def parse(soup): daily_lineups = [] card = soup.find_all('div', {'class': 'mlbMatchup clear'}) for lineup in card: lineup = { 'away_team': lineup.find('div', {'c
Cites O.rka · 2023-04 · Stack Overflow · on “How to scrape fields on eBay using beautifulSoup4 in Python?”
I'm watching this video [this video] (which is dated) and adapting this code [LINK] (which is broken). Learning a lot about web scraping from this and I've been able to adapt some of it to the changes in backend but not all of them. For example, I can't figure out how to get the "Sold date". I understand that it's within here: <div class="s-item__title--tag"> but I can't seem to scrape it out. I found this ( Storing data from a tag in Python with BeautifulSoup4 [LINK] ) but was unable to adapt it to my problem. Below you can see where I stopped, I was unable to scrape the Sold out date after I thought I figured out the pattern. Question: Can someone help me adapt my code to pull out the fields of