From db01af24cebb64ccaa20b6f009f7ec8da200260c Mon Sep 17 00:00:00 2001 From: Hell13Cat <46496367+Hell13Cat@users.noreply.github.com> Date: Sun, 2 Oct 2022 21:17:32 +0300 Subject: [PATCH] 0.0.4a description exception --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ea69afb..e6900a1 100644 --- a/main.py +++ b/main.py @@ -120,12 +120,16 @@ for url_get in urls_gets: data_res[kk] = "None" if "Статус перевода" not in data_res.keys(): data_res["Статус перевода"] = "None" + try: + desc_info = driver.find_element_by_class_name("media-description").text + except: + desc_info = "None" gen_json( dw_folder_root, data_res["name"], data_res["Автор"], data_res["Художник"], - driver.find_element_by_class_name("media-description").text, + desc_info, tag_list, status_a[data_res["Статус перевода"]] )