diff --git a/website/web/__init__.py b/website/web/__init__.py index aee26f51..907190d5 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -62,7 +62,9 @@ app.jinja_env.globals.update(sizeof_fmt=sizeof_fmt) def http_status_description(code: int): - return http.client.responses[code] + if code in http.client.responses: + return http.client.responses[code] + return f'Invalid code: {code}' app.jinja_env.globals.update(http_status_description=http_status_description) diff --git a/website/web/static/scrape.js b/website/web/static/scrape.js index 572beb8c..df978f3d 100644 --- a/website/web/static/scrape.js +++ b/website/web/static/scrape.js @@ -27,4 +27,7 @@ $('select[name="browser"]').change(function(){ $('#btn-looking').click(function() { $('#btn-looking').html('Looking...').addClass('disabled'); + $('#long').fadeOut(0).delay(9000).fadeIn(100); + $('#too-long').fadeOut(0).delay(19000).fadeIn(100); + $('#way-too-long').fadeOut(0).delay(27000).fadeIn(100); }); diff --git a/website/web/templates/scrape.html b/website/web/templates/scrape.html index f36c682a..52869dd6 100644 --- a/website/web/templates/scrape.html +++ b/website/web/templates/scrape.html @@ -98,6 +98,9 @@