From 6fc67a39d861a514339a9b9f6f78e16b00318d59 Mon Sep 17 00:00:00 2001 From: prahul11 Date: Mon, 6 Nov 2023 13:24:01 +0530 Subject: [PATCH] jg --- jobstreet/jst_malay_search.py | 6 +++++- jobstreet/jst_sg_search.py | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/jobstreet/jst_malay_search.py b/jobstreet/jst_malay_search.py index 05f013f..4469977 100644 --- a/jobstreet/jst_malay_search.py +++ b/jobstreet/jst_malay_search.py @@ -87,4 +87,8 @@ def search_jst_malay(csv_file): if __name__ == "__main__": - search_jst_malay("testdata_jst_malay2.csv") \ No newline at end of file + import datetime + current_date = datetime.datetime.now().date() + today_date = current_date.strftime('%d-%m-%Y') + search_file = f"malaysia_data/daily_search_results/my_search_{today_date}.csv" + search_jst_malay(search_file) \ No newline at end of file diff --git a/jobstreet/jst_sg_search.py b/jobstreet/jst_sg_search.py index 9e1aa22..b1a9541 100644 --- a/jobstreet/jst_sg_search.py +++ b/jobstreet/jst_sg_search.py @@ -3,7 +3,7 @@ from math import ceil from csv import DictWriter from time import sleep -def search_jst_malay(csv_file): +def search_jst_sg(csv_file): total_pages = 2 current_page = 1 url = 'https://xapi.supercharge-srp.co/job-search/graphql?country=sg&isSmartSearch=true' @@ -87,4 +87,8 @@ def search_jst_malay(csv_file): if __name__ == "__main__": - search_jst_malay("testdata_jst_sing.csv") \ No newline at end of file + import datetime + current_date = datetime.datetime.now().date() + today_date = current_date.strftime('%d-%m-%Y') + search_file = f"singapore_data/daily_search_results/sg_search_{today_date}.csv" + search_jst_sg(search_file) \ No newline at end of file