-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjobsAPI.py
39 lines (31 loc) · 1 KB
/
jobsAPI.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pip install serpapi
#pip install google-search-results
from serpapi import GoogleSearch
inp_job = "java"
params = {
"api_key": "74667d45acf8d73e71f442fcea119219a9c88b09bb187292159a3fc88235289c",
"engine": "google_jobs",
"google_domain": "google.com",
"q": str(inp_job)
}
search = GoogleSearch(params)
result = search.get_dict()
Job_ID = []
for job_result in result['jobs_results']:
Job_ID.append((job_result['job_id'],job_result['company_name'],job_result['title']))
print('1---------------------------------------------------------------1')
for job_id in Job_ID:
params = {
"api_key": "74667d45acf8d73e71f442fcea119219a9c88b09bb187292159a3fc88235289c",
"engine": "google_jobs_listing",
"q": str(job_id[0])
}
search = GoogleSearch(params)
results = search.get_dict()
try:
print('---------------------------------------------------------------')
print(job_id[1])
print(job_id[2])
print(results['apply_options'])
except:
continue