Skip to content

Prefer price number which is close to currency symbol #2

@kmike

Description

@kmike

Currently amount of items may be picked as a price, instead of the price number:

In [5]: Price.fromstring('3 Ausgaben für nur 14,85 EUR')
Out[5]: Price(amount=Decimal('3'), currency='EUR')

In [6]: Price.fromstring('Buy Now - 2 Litre Was $120.00 Now $60.00')
Out[6]: Price(amount=Decimal('2'), currency='$')

I think making price-parser to prefer numbers close to currency symbol (instead of taking the first one) may help to fix such cases - maybe not all of them, but at least some.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions