diff --git a/src/main.py b/src/main.py index 3448f51..3560c0e 100644 --- a/src/main.py +++ b/src/main.py @@ -59,7 +59,8 @@ if __name__ == "__main__": tg_handler_all = TelegramAllHandler(sites=[Site.GOOZALI], locations=["Tel Aviv, Israel", "Ramat Gan, Israel", "Central, Israel", "Rehovot ,Israel"], - title_filters=title_filters) + title_filters=title_filters, + search_term="software engineer") application.add_handler(CommandHandler("findAll", tg_handler_all.handle)) # application.add_handler(CommandHandler("galssdoor", find_glassdoor)) # application.add_handler(CommandHandler("linkedin", find_linkedin)) diff --git a/src/telegram_handler/telegram_all_handler.py b/src/telegram_handler/telegram_all_handler.py index 2eaecec..7b3a824 100644 --- a/src/telegram_handler/telegram_all_handler.py +++ b/src/telegram_handler/telegram_all_handler.py @@ -13,9 +13,10 @@ logger = create_logger("TelegramAllHandler") class TelegramAllHandler(TelegramHandler): - def __init__(self, sites: list[Site], locations: list[str], title_filters: list[str]): + def __init__(self, sites: list[Site], locations: list[str], title_filters: list[str],search_term:str): self.sites_to_scrap = sites self.locations = locations + self.search_term = search_term self.title_filters = title_filters self.telegramBot = TelegramBot() self.jobRepository = JobRepository() @@ -24,7 +25,7 @@ class TelegramAllHandler(TelegramHandler): logger.info("start handling") jobs = scrape_jobs( site_name=self.sites_to_scrap, - search_term="software engineer", + search_term=self.search_term, locations=self.locations, results_wanted=200, hours_old=48,