scrapinghub / price-parser

Extract price amount and currency symbol from a raw text string
BSD 3-Clause "New" or "Revised" License
316 stars 50 forks source link

Unable to parse values with scientific notation #50

Open jgrt opened 3 years ago

jgrt commented 3 years ago

First of all, thank you for creating it. it scales very well. overall nice library.

I came across this issue when currency value has E notation. Ex:

from price_parser import Price
Price.fromstring("3.891506499E8")
> Price(amount=Decimal('3.891506499'), currency=None)
Gallaecio commented 3 years ago

Could you share some online examples of this, for reference?