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

wish support chinese parse #37

Open mouday opened 4 years ago

mouday commented 4 years ago

eg:

from price_parser import Price

# ok
price = Price.fromstring("¥36,000")
print(price)
# Price(amount=Decimal('36000'), currency='¥')

# not ok
price = Price.fromstring("36元人民币")
print(price)
# Price(amount=Decimal('36'), currency=None)
bookin commented 10 months ago

The same problem with 'US$ ۱٬۰۱۲٬۲۳۴٫۵۶