update 4
parent
965dca1428
commit
d230e6280d
|
@ -104,11 +104,14 @@ class NaukriGulfJobDetailScraper:
|
||||||
# self.proxies = {"http": f"http://{proxy_server}", "https": f"http://{proxy_server}"} if (proxy_server := os.environ.get("PROXY_SERVER")) else {}
|
# self.proxies = {"http": f"http://{proxy_server}", "https": f"http://{proxy_server}"} if (proxy_server := os.environ.get("PROXY_SERVER")) else {}
|
||||||
|
|
||||||
def transform_data(self, job_id, jd_url, json_response):
|
def transform_data(self, job_id, jd_url, json_response):
|
||||||
|
source_value1 = json_response.get('other', {'tag': ''}).get('tag', '')
|
||||||
|
source_value2 = json_response.get('contact', {'website': ''}).get('website', '')
|
||||||
json_data = {
|
json_data = {
|
||||||
"Url" : jd_url,
|
"Url" : jd_url,
|
||||||
"Job Key" : job_id,
|
"Job Key" : job_id,
|
||||||
"Source Link": json_response.get('other', {'tag': ''}).get('tag','') + \
|
"Source Link": json_response.get('other', {'tag': ''}).get('tag','') + \
|
||||||
json_response.get('contact', {'website': ''}).get('website',''),
|
json_response.get('contact', {'website': ''}).get('website',''),
|
||||||
|
"Source Link": source_value1 if source_value1 else source_value2 if source_value2 else '',
|
||||||
"Job Description" : json_response.get('description',''),
|
"Job Description" : json_response.get('description',''),
|
||||||
"Role Category" :"",
|
"Role Category" :"",
|
||||||
"Job Industry" : ', '.join([t['title'] for t in json_response['industryInterlinking']]),
|
"Job Industry" : ', '.join([t['title'] for t in json_response['industryInterlinking']]),
|
||||||
|
|
Loading…
Reference in New Issue