Im trying to get the price generically from all the shopping sites
What i tried so far :
price = doc.xpath('//span[contains(text(), "$")]').try(:first).try(:content)
if (!price)
price = doc.xpath('//div[contains(text(), "$")]').try(:first).try(:content)
end
Example of the html i tried : https://jet.com/product/adidas-Real-Madrid-Ball-15-5/a08713c229924ceca7171850680d3e32 (The HTML of this url)
this is not working so well, what am i doing wrong? Thanks you all