@@ -617,8 +617,6 @@ def __eq__(self, other):
617
617
'Р' , '30' , 30 ),
618
618
Example ('€' , '€ 139.00' ,
619
619
'€' , '139.00' , 139 ),
620
- Example ('There are 163 products.' , 'From 26 to 50 €' ,
621
- '€' , '26' , 26 ),
622
620
Example ('Pris NOK 1 999,00' , '139,00' ,
623
621
'NOK' , '139,00' , 139 ),
624
622
Example ('/sqft' , '1.52' ,
@@ -1901,15 +1899,55 @@ def __eq__(self, other):
1901
1899
'CHF' , '19.90' , 19.90 ),
1902
1900
Example ('' , '530,42 Zł' ,
1903
1901
'Zł' , '530,42' , 530.42 ),
1902
+
1903
+ # Prefer values next to currency symbols
1904
+ Example ('3 Ausgaben für nur 14,85 EUR' , '3 Ausgaben für nur 14,85 EUR' ,
1905
+ 'EUR' , '14,85' , 14.85 ),
1906
+ Example (None , '2 items at 24,00€' ,
1907
+ '€' , '24,00' , 24.00 ),
1908
+ Example (None , '2 items at 24,00 €' ,
1909
+ '€' , '24,00' , 24.00 ),
1910
+ Example (None , '2 items at €24,00' ,
1911
+ '€' , '24,00' , 24.00 ),
1912
+ Example (None , '2 items at € 24,00' ,
1913
+ '€' , '24,00' , 24.00 ),
1914
+ Example (None , '2 items at 24,00€ or 30,00€' ,
1915
+ '€' , '24,00' , 24.00 ),
1916
+ Example (None , '2 items at 24,00€ or 30,00 €' ,
1917
+ '€' , '24,00' , 24.00 ),
1918
+ Example (None , '2 items at 24,00€ or €30,00' ,
1919
+ '€' , '24,00' , 24.00 ),
1920
+ Example (None , '2 items at 24,00€ or € 30,00' ,
1921
+ '€' , '24,00' , 24.00 ),
1922
+ Example (None , '2 items at 24,00 € or 30,00€' ,
1923
+ '€' , '24,00' , 24.00 ),
1924
+ Example (None , '2 items at 24,00 € or 30,00 €' ,
1925
+ '€' , '24,00' , 24.00 ),
1926
+ Example (None , '2 items at 24,00 € or €30,00' ,
1927
+ '€' , '24,00' , 24.00 ),
1928
+ Example (None , '2 items at 24,00 € or € 30,00' ,
1929
+ '€' , '24,00' , 24.00 ),
1930
+ Example (None , '2 items at €24,00 or 30,00€' ,
1931
+ '€' , '24,00' , 24.00 ),
1932
+ Example (None , '2 items at €24,00 or 30,00 €' ,
1933
+ '€' , '24,00' , 24.00 ),
1934
+ Example (None , '2 items at €24,00 or €30,00' ,
1935
+ '€' , '24,00' , 24.00 ),
1936
+ Example (None , '2 items at €24,00 or € 30,00' ,
1937
+ '€' , '24,00' , 24.00 ),
1938
+ Example (None , '2 items at € 24,00 or 30,00€' ,
1939
+ '€' , '24,00' , 24.00 ),
1940
+ Example (None , '2 items at € 24,00 or 30,00 €' ,
1941
+ '€' , '24,00' , 24.00 ),
1942
+ Example (None , '2 items at € 24,00 or €30,00' ,
1943
+ '€' , '24,00' , 24.00 ),
1944
+ Example (None , '2 items at € 24,00 or € 30,00' ,
1945
+ '€' , '24,00' , 24.00 ),
1904
1946
]
1905
1947
1906
1948
1907
1949
PRICE_PARSING_EXAMPLES_XFAIL = [
1908
1950
# amount is picked as a price
1909
- Example ('3 Ausgaben für nur 14,85 EUR' , '3 Ausgaben für nur 14,85 EUR' ,
1910
- 'EUR' , '14,85' , 14.85 ),
1911
- Example (None , 'Buy Now - 2 Litre Was $120.00 Now $60.00' ,
1912
- '$' , '60.00' , 60 ),
1913
1951
Example ('Цена: уточняйте (мин. заказ: 1 )' , 'Цена: уточняйте (мин. заказ: 1 )' ,
1914
1952
None , None , None ),
1915
1953
Example (None , '50 - $2.00 100 - $2.75 400 - $4.50 1,000 - $9.00 2,000 - $17.00 3,000 - $24.00 10,000 - $75.00' ,
@@ -1923,6 +1961,14 @@ def __eq__(self, other):
1923
1961
Example ('Cuneo' , '61.858 L' , # Romanian New Leu
1924
1962
'L' , '61.858' , 61858 ),
1925
1963
1964
+ # no handling of price ranges
1965
+ Example ('There are 163 products.' , 'From 26 to 50 €' ,
1966
+ '€' , '26' , 26 ),
1967
+
1968
+ # no handling of old-vs-new prices
1969
+ Example (None , 'Buy Now - 2 Litre Was $120.00 Now $60.00' ,
1970
+ '$' , '60.00' , 60 ),
1971
+
1926
1972
# "р" / "руб" is detected as currency
1927
1973
Example ('>' , 'См. цену в прайсе' ,
1928
1974
None , None , None ),
0 commit comments