feat: add version to banner (#560)

This commit is contained in:
Jens Bergmann
2025-06-22 21:11:13 +02:00
committed by GitHub
parent 55776f3ff6
commit c3499b3824
2 changed files with 9 additions and 7 deletions

View File

@@ -1081,7 +1081,8 @@ class KleinanzeigenBot(WebScrapingMixin):
# only click on "Individueller Versand" when "IndividualShippingInput" is not available, otherwise its already checked # only click on "Individueller Versand" when "IndividualShippingInput" is not available, otherwise its already checked
# (important for mode = UPDATE) # (important for mode = UPDATE)
await self.web_find(By.XPATH, 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: except TimeoutError:
await self.web_click(By.XPATH, '//*[contains(@id, "INDIVIDUAL") and contains(@data-testid, "Individueller Versand")]') 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: def main(args:list[str]) -> None:
if "version" not in args: 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 https://github.com/Second-Hand-Friends/kleinanzeigen-bot
Version: {__version__}
""")[1:], flush = True) # [1:] removes the first empty blank line """)[1:], flush = True) # [1:] removes the first empty blank line
loggers.configure_console_logging() loggers.configure_console_logging()