fix auction listings
This commit is contained in:
@ -28,11 +28,13 @@ def scrape_listing(url):
|
||||
soup = make_soup(url)
|
||||
#print(soup)
|
||||
#print(soup.find("div", class_="vim x-item-title").span.text)
|
||||
#print(soup.find("span", class_="ux-call-to-action__text").text)
|
||||
#print(soup.find("span", itemprop="price")["content"])
|
||||
#print(soup.find("img", itemprop="image")["src"])
|
||||
|
||||
listing = {
|
||||
'title': soup.find("div", class_="vim x-item-title").span.text,
|
||||
'directbuy' : True if soup.find("span", class_="ux-call-to-action__text").text == "Sofort-Kaufen" else False,
|
||||
'price': float(soup.find("span", itemprop="price")["content"]),
|
||||
'image': soup.find("img", itemprop="image")["src"],
|
||||
'url' : url
|
||||
@ -40,7 +42,7 @@ def scrape_listing(url):
|
||||
return listing
|
||||
|
||||
if __name__ == "__main__":
|
||||
while(1):
|
||||
listing = scrape_listing("https://www.ebay.de/itm/165841583057")
|
||||
#while(1):
|
||||
listing = scrape_listing("https://www.ebay.de/itm/225333003766")
|
||||
print(listing)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user