From dca266db1fc37e01b1c2d480e258f1903d0808ae Mon Sep 17 00:00:00 2001 From: garickbadalov Date: Tue, 26 Sep 2023 01:30:36 +0300 Subject: [PATCH] minor fixes --- src/core/master_service.py | 1 + src/web/templates/index.html | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/master_service.py b/src/core/master_service.py index 185bbec..3ec13d3 100644 --- a/src/core/master_service.py +++ b/src/core/master_service.py @@ -85,6 +85,7 @@ class MasterService: "likee.video": BaseParser(params), "dzen.ru": BaseParser(params), "yappy.media": YappyParser(params), + "yandex.ru": BaseParser(params), } return parser_mapping[domain] except KeyError: diff --git a/src/web/templates/index.html b/src/web/templates/index.html index 57142ee..2c36999 100644 --- a/src/web/templates/index.html +++ b/src/web/templates/index.html @@ -105,8 +105,13 @@ result.innerHTML = xhr2.response.result; result.href = xhr2.response.result; }; - setTimeout(sendReq, 5000); + if (xhr2.status !== 510) { + setTimeout(sendReq, 5000); + } else { + document.forms.download.querySelector('[type="submit"]').disabled = false; + document.forms.download.querySelector('.submit-spinner').classList.add('submit-spinner_hide'); + }; } else if (xhr2.status === 200) { result.innerHTML = xhr2.response.result; result.href = xhr2.response.result;