Skip to content

Commit

Permalink
Support cents, fixes scrapinghub#6
Browse files Browse the repository at this point in the history
  • Loading branch information
manycoding committed Jul 5, 2019
1 parent 48d08c5 commit f62ca91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion price_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def or_regex(symbols: List[str]) -> Pattern:
'SY£', 'LB£', 'CN¥', 'GH₵',

# unique currency symbols
'$', '€', '£', 'zł', 'Zł', 'Kč', '₽', '¥', '¥',
'$', '¢', '€', '£', 'zł', 'Zł', 'Kč', '₽', '¥', '¥',
'฿', 'դր.', 'դր', '₦', '₴', '₱', '৳', '₭', '₪', '﷼', '៛', '₩', '₫', '₡',
'টকা', 'ƒ', '₲', '؋', '₮', 'नेरू', '₨',
'₶', '₾', '֏', 'ރ', '৲', '૱', '௹', '₠', '₢', '₣', '₤', '₧', '₯',
Expand Down
4 changes: 3 additions & 1 deletion tests/test_price_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def __eq__(self, other):
Example(None, 'AED 8000 (USD 2179)',
'AED', '8000', 8000),
Example(None, '13800 ₶',
'₶', '13800', 13800)
'₶', '13800', 13800),
Example(None, '99¢',
'¢', '99', 99)
]


Expand Down

0 comments on commit f62ca91

Please sign in to comment.