diff options
author | asciimoo <asciimoo@gmail.com> | 2014-01-20 02:31:20 +0100 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2014-01-20 02:31:20 +0100 |
commit | b2492c94f422e18cb8954ec983134f4fa5c7cdc0 (patch) | |
tree | 969ea30e5dc642d896fa7b744571110ebfe13e7a /searx/engines/currency_convert.py | |
parent | 692c0bf5f0b353bfbb46aaee1af54afb164dedbc (diff) | |
download | searxng-b2492c94f422e18cb8954ec983134f4fa5c7cdc0.tar.gz searxng-b2492c94f422e18cb8954ec983134f4fa5c7cdc0.zip |
[fix] pep/flake8 compatibility
Diffstat (limited to 'searx/engines/currency_convert.py')
-rw-r--r-- | searx/engines/currency_convert.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/searx/engines/currency_convert.py b/searx/engines/currency_convert.py index f08a01e00..ce6b3b854 100644 --- a/searx/engines/currency_convert.py +++ b/searx/engines/currency_convert.py @@ -5,7 +5,7 @@ categories = [] url = 'http://finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s={query}=X' weight = 100 -parser_re = re.compile(r'^\W*(\d+(?:\.\d+)?)\W*([a-z]{3})\W*(?:in)?\W*([a-z]{3})\W*$', re.I) +parser_re = re.compile(r'^\W*(\d+(?:\.\d+)?)\W*([a-z]{3})\W*(?:in)?\W*([a-z]{3})\W*$', re.I) # noqa def request(query, params): @@ -46,9 +46,11 @@ def response(resp): resp.search_params['ammount'] * conversion_rate ) - content = '1 {0} is {1} {2}'.format(resp.search_params['from'], conversion_rate, resp.search_params['to']) + content = '1 {0} is {1} {2}'.format(resp.search_params['from'], + conversion_rate, + resp.search_params['to']) now_date = datetime.now().strftime('%Y%m%d') - url = 'http://finance.yahoo.com/currency/converter-results/{0}/{1}-{2}-to-{3}.html' + url = 'http://finance.yahoo.com/currency/converter-results/{0}/{1}-{2}-to-{3}.html' # noqa url = url.format( now_date, resp.search_params['ammount'], |