From d7b081a80c85f2f91210aa3a15204778b4cf97dd Mon Sep 17 00:00:00 2001 From: Computerboer Date: Fri, 12 Jul 2024 23:45:44 +0200 Subject: [PATCH] cleaned up some code --- utils/auctionutils.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/utils/auctionutils.py b/utils/auctionutils.py index 4d62c8e..5f4a780 100644 --- a/utils/auctionutils.py +++ b/utils/auctionutils.py @@ -14,7 +14,6 @@ def getAuctionlocations(countrycode: Countrycode): res = FileCache.get(cachename, 23) - # res = Cache.get(cachename) if(res): return res @@ -89,7 +88,6 @@ def getTwkAuctions(countrycode): if(res): return res - # buildidresponse = requests.get('https://www.troostwijkauctions.com/') twkDataUrl = getTWKUrl(); if(twkDataUrl is None): @@ -132,10 +130,7 @@ def getTWKAuction(twkDataUrl, auctionurlslug): twka = data['pageProps']['auction']; firstlot = data['pageProps']['lots']['results'][0] city = "Nederland" if firstlot['location']['city'].lower() == 'online' or firstlot['location']['city'].lower() == "free delivery" else firstlot['location']['city'] - # if(firstlot['location']['city'].lower() != 'online'): - # city = firstlot['location']['city']; a = Auction(Auctionbrand.TWK, city, firstlot['location']['countryCode'].upper(), twka['name'], datetime.fromtimestamp(twka['startDate']), datetime.fromtimestamp(twka['minEndDate']), '/a/' + auctionurlslug, twka['image']['url'], twka['lotCount'] ) - # print(a); return a; return None @@ -165,8 +160,7 @@ def getOVMAuctions(): startdatetime = result['openingsDatumISO'].replace("T", " ").replace("Z", "") enddatetime = result['sluitingsDatumISO'].replace("T", " ").replace("Z", "") image = ""; - #if hasattr(result, 'image') : #result['image'] : - image = result.get('image', "") #['image'] + image = result.get('image', "") if image == "": image = result.get('imageList', [""])[0]