-
Notifications
You must be signed in to change notification settings - Fork 0
/
transmarketgroup.py
71 lines (50 loc) · 1.76 KB
/
transmarketgroup.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import requests
from bs4 import BeautifulSoup
import smtplib
import time
from datetime import datetime
import ssl
# Function to scrape the Shopify careers page for software intern positions
def transmarketgroup_scraper():
url = "https://boards.greenhouse.io/transmarketgroup?t=081a3afb7us"
response = requests.get(url)
soup = BeautifulSoup(response.text, "html.parser")
job_listings = soup.find_all("div", class_="opening")
joblist = []
for job in job_listings:
find = job.find_all('a')
joblist.append(find)
#print(joblist)
job_dict = {}
for job in joblist:
if job:
job_dict[job[0].text] = "https://boards.greenhouse.io" + job[0].get("href")
real_job = {}
for job in job_dict.keys():
if "intern" in job.lower():
real_job[job] = job_dict[job]
roles = list(real_job.keys())
values = list(real_job.values())
final = []
for a, i in enumerate(roles):
final.append({"company": "Trans Market Group", "role": i, "link": values[a]})
return final
# Main function
def main():
# Initialize the list of seen jobs
seen_jobs = set()
print(transmarketgroup_scraper())
'''while True:
# Scrape the Visa careers page
current_jobs = set(virtu_scraper())
# Check for new jobs
new_jobs = current_jobs - seen_jobs
if new_jobs:
send_email(new_jobs)
# Update the set of seen jobs
seen_jobs.update(current_jobs)
# Print the current time and sleep for one day
print(f"{datetime.now()} - Checked for new jobs.")
time.sleep(86400)'''
if __name__ == "__main__":
main()