summaryrefslogtreecommitdiffstats
path: root/ebknotify/cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'ebknotify/cache.py')
-rw-r--r--ebknotify/cache.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ebknotify/cache.py b/ebknotify/cache.py
index d1188dd..faa5fbf 100644
--- a/ebknotify/cache.py
+++ b/ebknotify/cache.py
@@ -52,11 +52,11 @@ class Cache():
img = None
try:
place = ad['locations']['location'][0]['localized-name']['value']
- radius = ad['locations']['location'][0]['radius']['value']
+ distance = round(float(ad['search-distance']['distance']['value']),2)
except Exception as e:
print(e)
place = None
- radius = None
+ distance = None
# TODO: fetch detailed article
ad['notify'] = {
'filter': searchquery,
@@ -66,7 +66,7 @@ class Cache():
'title-unescaped': title_unescaped,
'age_in_h': age_in_h,
'place': place,
- 'radius': radius,
+ 'distance': distance,
'price': price,
'image': img,
'url': ad['link'][1]['href'],