Repository: scrapinghub/price-parser

Issue:
It can't parse Asian text currency like '원',  '円'.
Korean, and Japanese uses each specific money character like '₩', '￥'.
But that country also using their text based money character to represent currency.
Korean uses '원', Japanese uses '円'.
but this parser can't parse that character.

Thank you.

Discussion:

Patch:
diff --git a/price_parser/_currencies.py b/price_parser/_currencies.py
index ed0ce46..a6563aa 100644
--- a/price_parser/_currencies.py
+++ b/price_parser/_currencies.py
@@ -648,6 +648,7 @@ CURRENCIES: Dict[str, Dict] = {
         "s": "¥",
         "n": "Japanese Yen",
         "sn": "￥",
+        "sn2": ["円"],
         "d": 0,
         "r": 0,
         "np": "Japanese yen"
@@ -687,7 +688,7 @@ CURRENCIES: Dict[str, Dict] = {
     "KPW": {
         "s": "₩",
         "n": "North Korean Won",
-        "sn": "₩",
+        "sn": "원",
         "d": 0,
         "r": 0,
         "np": "North Korean Won"
@@ -695,7 +696,7 @@ CURRENCIES: Dict[str, Dict] = {
     "KRW": {
         "s": "₩",
         "n": "South Korean Won",
-        "sn": "₩",
+        "sn": "원",
         "d": 0,
         "r": 0,
         "np": "South Korean won"


Test patch:
diff --git a/tests/test_price_parsing.py b/tests/test_price_parsing.py
index e7fd9bf..28ee0a3 100644
--- a/tests/test_price_parsing.py
+++ b/tests/test_price_parsing.py
@@ -82,7 +82,11 @@ PRICE_PARSING_EXAMPLES_NEW = [
     Example(None, 'AED 8000 (USD 2179)',
             'AED', '8000', 8000),
     Example(None, '13800 ₶',
-            '₶', '13800', 13800)
+            '₶', '13800', 13800),
+    Example(None, '12,000원',
+            '원', '12,000', 12000),
+    Example(None, '3,500円',
+            '円', '3,500', 3500)
 ]