mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-13 10:51:51 +01:00
Fixes #174 handle new initial popup banner
This commit is contained in:
@@ -349,6 +349,12 @@ class KleinanzeigenBot(SeleniumMixin):
|
|||||||
LOG.info("Logging in as [%s]...", self.config["login"]["username"])
|
LOG.info("Logging in as [%s]...", self.config["login"]["username"])
|
||||||
self.web_open(f"{self.root_url}/m-einloggen.html?targetUrl=/")
|
self.web_open(f"{self.root_url}/m-einloggen.html?targetUrl=/")
|
||||||
|
|
||||||
|
# close redesign banner
|
||||||
|
try:
|
||||||
|
self.web_click(By.XPATH, '//*[@id="pre-launch-comms-interstitial-frontend"]//button[.//*[text()[contains(.,"nicht mehr anzeigen")]]]')
|
||||||
|
except NoSuchElementException:
|
||||||
|
pass
|
||||||
|
|
||||||
# accept privacy banner
|
# accept privacy banner
|
||||||
try:
|
try:
|
||||||
self.web_click(By.ID, "gdpr-banner-accept")
|
self.web_click(By.ID, "gdpr-banner-accept")
|
||||||
@@ -934,7 +940,7 @@ class KleinanzeigenBot(SeleniumMixin):
|
|||||||
|
|
||||||
# check which ads already saved
|
# check which ads already saved
|
||||||
saved_ad_ids = []
|
saved_ad_ids = []
|
||||||
ads = self.load_ads(ignore_inactive=False, check_id=False) # do not skip because of existing IDs
|
ads = self.load_ads(ignore_inactive = False, check_id = False) # do not skip because of existing IDs
|
||||||
for ad_ in ads:
|
for ad_ in ads:
|
||||||
ad_id = int(ad_[2]['id'])
|
ad_id = int(ad_[2]['id'])
|
||||||
saved_ad_ids.append(ad_id)
|
saved_ad_ids.append(ad_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user