I just want to extract price data with out the $. There are multiple prices in the file and I only want the ones that come after class="price price-label "> and not the ones that are after class="strike">
I Pasted the full code - I am pulling the info form file.txt - My desired output is to have the name and price Side by side. I have not used Beautiful Soup before.
data-default-alt="Ford Truck"> </h3> </a> </div> <div class="tileInfo"> <div class="swatchesBox--empty"></div> <div class="promo-msg-text"> <span class="calloutMsg-promo-msg-text"></span> </div> <div class="pricecontainer" data-pricetype="Stand Alone"> <p id="price_206019013" class="price price-label "> $1,000.00 </p>
My Code
with open("targetbubbles.txt") as str:
st = str.read()
#print st
import re
#brand=re.search('data-default-title=\"(.*?)" ',st)
#cost=re.search('\$(\d+,?\d*\.\d+)</p>',st)