|
@@ -44,15 +44,15 @@ def request(query, params):
|
44
|
44
|
# wrong query
|
45
|
45
|
return params
|
46
|
46
|
|
47
|
|
- ammount, from_currency, to_currency = m.groups()
|
48
|
|
- ammount = float(ammount)
|
|
47
|
+ amount, from_currency, to_currency = m.groups()
|
|
48
|
+ amount = float(amount)
|
49
|
49
|
from_currency = name_to_iso4217(from_currency.strip())
|
50
|
50
|
to_currency = name_to_iso4217(to_currency.strip())
|
51
|
51
|
|
52
|
52
|
q = (from_currency + to_currency).upper()
|
53
|
53
|
|
54
|
54
|
params['url'] = url.format(from_currency, to_currency)
|
55
|
|
- params['ammount'] = ammount
|
|
55
|
+ params['amount'] = amount
|
56
|
56
|
params['from'] = from_currency
|
57
|
57
|
params['to'] = to_currency
|
58
|
58
|
params['from_name'] = iso4217_to_name(from_currency, 'en')
|
|
@@ -73,9 +73,9 @@ def response(resp):
|
73
|
73
|
return results
|
74
|
74
|
|
75
|
75
|
answer = '{0} {1} = {2} {3}, 1 {1} ({5}) = {4} {3} ({6})'.format(
|
76
|
|
- resp.search_params['ammount'],
|
|
76
|
+ resp.search_params['amount'],
|
77
|
77
|
resp.search_params['from'],
|
78
|
|
- resp.search_params['ammount'] * conversion_rate,
|
|
78
|
+ resp.search_params['amount'] * conversion_rate,
|
79
|
79
|
resp.search_params['to'],
|
80
|
80
|
conversion_rate,
|
81
|
81
|
resp.search_params['from_name'],
|