From 85412b14a53f7a3287ba976a0ed9f24e192a3901 Mon Sep 17 00:00:00 2001 From: renaud gaudin Date: Sat, 27 Mar 2021 14:22:40 +0000 Subject: [PATCH] fixed improper status check --- sushichef.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sushichef.py b/sushichef.py index 06d86181..68d7f0f2 100755 --- a/sushichef.py +++ b/sushichef.py @@ -1053,14 +1053,14 @@ def get_id(self): else: self.x_deki_token = None + self.page_id = None + self.guid = None query_param = self.soup.find("div", class_="mt-guide-tabs-container") if query_param is not None: self.page_id = query_param.attrs.get("data-page-id", "") query_param = self.soup.find("li", class_="mt-guide-tab") - self.guid = query_param.attrs.get("data-guid", "") - else: - self.page_id = None - self.guid = None + if query_param is not None: + self.guid = query_param.attrs.get("data-guid", "") def body(self): if self.page_id is not None and self.guid is not None: