Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Last active April 21, 2020 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BMU-Verlag/aa9b88b7d57c5aa0672b99d01ebbea52 to your computer and use it in GitHub Desktop.
Save BMU-Verlag/aa9b88b7d57c5aa0672b99d01ebbea52 to your computer and use it in GitHub Desktop.
price = 0.0
price_span = soup.find('span', id='priceblock_dealprice')
if price_span is None:
price_span = soup.find('span', id='priceblock_ourprice')
if price_span is None:
price_span = soup.find('span', class_=a-color-price')
if price_span is not None:
price = parse_price(price_span.get_text())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment