mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
feat: add version to banner (#560)
This commit is contained in:
@@ -833,7 +833,7 @@ class KleinanzeigenBot(WebScrapingMixin):
|
||||
img_items = await self.web_find_all(By.CSS_SELECTOR,
|
||||
"ul#j-pictureupload-thumbnails > li.ui-sortable-handle")
|
||||
for element in img_items:
|
||||
btn = await self.web_find(By.CSS_SELECTOR, "button.pictureupload-thumbnails-remove", parent=element)
|
||||
btn = await self.web_find(By.CSS_SELECTOR, "button.pictureupload-thumbnails-remove", parent = element)
|
||||
await btn.click()
|
||||
|
||||
#############################
|
||||
@@ -1052,7 +1052,7 @@ class KleinanzeigenBot(WebScrapingMixin):
|
||||
if mode == AdUpdateStrategy.MODIFY:
|
||||
try:
|
||||
# when "Andere Versandmethoden" is not available, go back and start over new
|
||||
await self.web_find(By.XPATH, '//*[contains(@class, "CarrierSelectionModal")]//button[contains(., "Andere Versandmethoden")]', timeout=2)
|
||||
await self.web_find(By.XPATH, '//*[contains(@class, "CarrierSelectionModal")]//button[contains(., "Andere Versandmethoden")]', timeout = 2)
|
||||
except TimeoutError:
|
||||
await self.web_click(By.XPATH, '//dialog//button[contains(., "Zurück")]')
|
||||
|
||||
@@ -1081,7 +1081,8 @@ class KleinanzeigenBot(WebScrapingMixin):
|
||||
# only click on "Individueller Versand" when "IndividualShippingInput" is not available, otherwise its already checked
|
||||
# (important for mode = UPDATE)
|
||||
await self.web_find(By.XPATH,
|
||||
'//*[contains(@class, "IndividualPriceSection")]//div[contains(@class, "IndividualShippingInput")]', timeout=2)
|
||||
'//*[contains(@class, "IndividualPriceSection")]//div[contains(@class, "IndividualShippingInput")]',
|
||||
timeout = 2)
|
||||
except TimeoutError:
|
||||
await self.web_click(By.XPATH, '//*[contains(@id, "INDIVIDUAL") and contains(@data-testid, "Individueller Versand")]')
|
||||
|
||||
@@ -1298,7 +1299,7 @@ class KleinanzeigenBot(WebScrapingMixin):
|
||||
|
||||
def main(args:list[str]) -> None:
|
||||
if "version" not in args:
|
||||
print(textwrap.dedent(r"""
|
||||
print(textwrap.dedent(rf"""
|
||||
_ _ _ _ _ _
|
||||
| | _| | ___(_)_ __ __ _ _ __ _______(_) __ _ ___ _ __ | |__ ___ | |_
|
||||
| |/ / |/ _ \ | '_ \ / _` | '_ \|_ / _ \ |/ _` |/ _ \ '_ \ ____| '_ \ / _ \| __|
|
||||
@@ -1306,6 +1307,7 @@ def main(args:list[str]) -> None:
|
||||
|_|\_\_|\___|_|_| |_|\__,_|_| |_/___\___|_|\__, |\___|_| |_| |_.__/ \___/ \__|
|
||||
|___/
|
||||
https://github.com/Second-Hand-Friends/kleinanzeigen-bot
|
||||
Version: {__version__}
|
||||
""")[1:], flush = True) # [1:] removes the first empty blank line
|
||||
|
||||
loggers.configure_console_logging()
|
||||
|
||||
Reference in New Issue
Block a user