From 368793631ab8c805b6a7d6ce8b75c25396e7c1d9 Mon Sep 17 00:00:00 2001 From: pluja Date: Fri, 29 Oct 2021 18:00:22 +0200 Subject: [PATCH] temporary fix trustpilot score on services --- kycnot.py | 7 ++++++- templates/about.html | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/kycnot.py b/kycnot.py index 2758381..5f7eab5 100755 --- a/kycnot.py +++ b/kycnot.py @@ -93,7 +93,12 @@ async def service(request, name=None): data = yaml.load(services) for service in data['services']: if service['name'].replace(' ', '').lower() == name: - tpinfo = await get_trustpilot_info(service) + try: + tpinfo = await get_trustpilot_info(service) + except: + tpinfo = { + "score": False + } template = env.get_template('service.html') return html(template.render(date=date, service=service, tpinfo=tpinfo)) return(f"{name} does not exist") diff --git a/templates/about.html b/templates/about.html index 7e8d021..de0729b 100644 --- a/templates/about.html +++ b/templates/about.html @@ -248,7 +248,7 @@
- Donate Bitcoin + Donate Bitcoin
+ +
Donate Nano