From ea74f47a2c3f27f7139e0c14d52fd1416cb99b97 Mon Sep 17 00:00:00 2001 From: Computerboer Date: Fri, 12 Jul 2024 23:20:19 +0200 Subject: [PATCH] Fixed error on logging --- utils/auctionutils.py | 2 +- utils/helperutils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/auctionutils.py b/utils/auctionutils.py index fb8c12b..4d62c8e 100644 --- a/utils/auctionutils.py +++ b/utils/auctionutils.py @@ -131,7 +131,7 @@ def getTWKAuction(twkDataUrl, auctionurlslug): twka = data['pageProps']['auction']; firstlot = data['pageProps']['lots']['results'][0] - city = "Nederland" if firstlot['location']['city'].lower() == 'online' else firstlot['location']['city'] + 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'] ) diff --git a/utils/helperutils.py b/utils/helperutils.py index 365297e..278747f 100644 --- a/utils/helperutils.py +++ b/utils/helperutils.py @@ -1,5 +1,5 @@ from datetime import datetime, timedelta def log(value): - print(str(datetime.now()) + ' ' + value) + print(u' '.join(( str(datetime.now()), value)).encode('utf-8').strip()) # print( str(value)) \ No newline at end of file