-
Notifications
You must be signed in to change notification settings - Fork 0
/
indeed_api_scraper.py
29 lines (25 loc) · 989 Bytes
/
indeed_api_scraper.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
# verifying indeed publisher number
from indeed import IndeedClient
client = IndeedClient(publisher = 'publisher_number')
params = {
'q' : "software engineer",
'l' : "Chicago",
'sort' : "date",
'fromage' : "5",
'limit' : "50",
'filter' : "1",
'userip' : "ip_address",
'useragent' : "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
}
# main search function
def get_offers(params):
search_results = client.search(**params) #perform search
for elm in search_results['results']:
offer = (elm['jobtitle'], #parsing the offer
elm['formattedLocation'],
elm['formattedLocation'],
elm['snippet'],
elm['url'],
elm['indeedApply'],
elm['jobkey'],
elm['date'])