mirror of https://github.com/Bunsly/JobSpy
added search_term to init
parent
4549b2ffc8
commit
f1b127ae44
|
@ -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))
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue