From 1c08d807e9ca6c4dcd165178c3a108638826ce5a Mon Sep 17 00:00:00 2001 From: Jeppy Date: Tue, 20 Dec 2022 22:42:05 +0100 Subject: [PATCH] FIX do not click on pstad-price to wait for category detection (#148) --- kleinanzeigen_bot/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kleinanzeigen_bot/__init__.py b/kleinanzeigen_bot/__init__.py index d94c05e..6c7528b 100644 --- a/kleinanzeigen_bot/__init__.py +++ b/kleinanzeigen_bot/__init__.py @@ -584,8 +584,9 @@ class KleinanzeigenBot(SeleniumMixin): utils.save_dict(ad_file, ad_cfg_orig) def __set_category(self, ad_file:str, ad_cfg: dict[str, Any]): - # trigger and wait for automatic category detection - self.web_click(By.ID, "pstad-price") + # click on something to trigger automatic category detection + self.web_click(By.ID, "pstad-descrptn") + try: self.web_find(By.XPATH, "//*[@id='postad-category-path'][text()]") is_category_auto_selected = True