From d16ce227dc68c9f60f6dd06e6835bab7cdfdf61b Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 1 Apr 2020 11:02:52 +0200 Subject: use distance instead of radius --- ebknotify/cache.py | 6 +++--- ebknotify/feed.py | 2 +- 2 files changed, 4 insertions(+), 4 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'], diff --git a/ebknotify/feed.py b/ebknotify/feed.py index 8d267a5..98d88a2 100644 --- a/ebknotify/feed.py +++ b/ebknotify/feed.py @@ -27,7 +27,7 @@ class Feed(FeedGenerator):
-- cgit v1.2.3