Skip to content

Commit

Permalink
Fixed bugs on some scrapers regarding job type and cities
Browse files Browse the repository at this point in the history
  • Loading branch information
RaresCode committed Jan 25, 2024
1 parent b8d92d1 commit de9e617
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 11 deletions.
4 changes: 2 additions & 2 deletions sites/affidearomania.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def scrape_jobs(self):
Scrape job data from affidearomania website.
"""

job_elements = self.get_jobs_elements('css_', 'h5 > a')
job_cities_elements = self.get_jobs_elements('class_', 'job-location')
job_elements = self.get_jobs_elements('class_', 'sc-6exb5d-1 cTfiAE')
job_cities_elements = self.get_jobs_elements('class_', 'custom-css-style-job-location-city')

self.job_titles = self.get_jobs_details_text(job_elements)
self.job_cities = self.get_jobs_details_text(job_cities_elements)
Expand Down
3 changes: 1 addition & 2 deletions sites/ensemblesoftware.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def scrape_jobs(self):

self.format_data()


def sent_to_future(self):
self.send_to_viitor()

Expand All @@ -51,7 +50,7 @@ def format_data(self):
"""
for job_title, job_url in zip(self.job_titles, self.job_urls):
job_url = f"https://www.ensemblesoftware.ro/{job_url}"
self.create_jobs_dict(job_title, job_url, "România", ['Baia Mare', 'Brasov', 'Cluj'])
self.create_jobs_dict(job_title, job_url, "România", ['Baia Mare', 'Brasov', 'Cluj-Napoca'], 'remote')

if __name__ == "__main__":
ensemblesoftware = ensemblesoftwareScraper()
Expand Down
2 changes: 2 additions & 0 deletions sites/htecgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def format_data(self):
Iterate over all job details and send to the create jobs dictionary.
"""
for job_title, job_url in zip(self.job_titles, self.job_urls):
if "Kragujevac" in job_title:
continue
self.create_jobs_dict(job_title, job_url, "România", "Bucuresti", "remote")


Expand Down
7 changes: 6 additions & 1 deletion sites/intelligentbee.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ def format_data(self):
Iterate over all job details and send to the create jobs dictionary.
"""
for job_title, job_url in zip(self.job_titles, self.job_urls):
remote = "On-site"
if "remote" in job_title:
remote = "remote"
elif "hybrid" in job_title:
remote = "hybrid"
job_url = "https://intelligentbee.com" + job_url
self.create_jobs_dict(job_title, job_url, "România", "Iasi")
self.create_jobs_dict(job_title, job_url, "România", "Iasi", remote)

if __name__ == "__main__":
intelligentbee = intelligentbeeScraper()
Expand Down
2 changes: 1 addition & 1 deletion sites/interbrandsorbico.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def scrape_jobs(self):
Scrape job data from InterbrandsOrbico website.
"""

job_titles_elements = self.get_jobs_elements('class_', "sc-6exb5d-1 dLpFZe")
job_titles_elements = self.get_jobs_elements('class_', "sc-6exb5d-1 jnZALp")
locations = self.get_jobs_elements('class_', "custom-css-style-job-location")
job_urls = self.get_jobs_elements('class_', "sc-s03za1-0 iCILJS")

Expand Down
2 changes: 1 addition & 1 deletion sites/iuliuscompany.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def format_data(self):
"""
for job_title, job_url, job_city in zip(self.job_titles, self.job_urls, self.job_cities):
job_url = self.url + job_url
self.create_jobs_dict(job_title, job_url, "România", job_city.replace("LOCAȚIE: ", ""))
self.create_jobs_dict(job_title, job_url, "România", job_city.replace("LOCAȚIE: ", "").replace("Cluj", "Cluj-Napoca"))

if __name__ == "__main__":
iuliuscompany = iuliuscompanyScraper()
Expand Down
10 changes: 8 additions & 2 deletions sites/jobshop.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ def format_data(self):
Iterate over all job details and send to the create jobs dictionary.
"""
for job_title, job_city, job_url in zip(self.job_titles, self.job_cities, self.job_urls):
job_city = job_city.split("•")[1][1:]
if "Remote" in job_city:
remote = "remote"
job_city = "Iasi"
else:
remote = "On-site"
job_city = job_city.replace("ș", "s").split("•")[1][1:-1]

job_url = f"https://www.jobshop.bestis.ro{job_url}"
self.create_jobs_dict(job_title, job_url, "România", job_city)
self.create_jobs_dict(job_title, job_url, "România", job_city, remote)

if __name__ == "__main__":
jobshop = jobshopScraper()
Expand Down
2 changes: 1 addition & 1 deletion sites/kinetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def format_data(self):
"""
for job_title in self.job_titles:
job_url = self.url + "#" + str(self.job_count)
self.create_jobs_dict(job_title, job_url, "România", ["Iasi", "Bucuresti", "Cluj"])
self.create_jobs_dict(job_title, job_url, "România", ["Iasi", "Bucuresti", "Cluj-Napoca"])
self.job_count += 1

if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions sites/script_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def run(self):
'typingdna.py', # This does not have a career's page now
'netrom.py', # This does not have a career's page now
'kaizengaming.py', # Website changed
'sonrisatechnologies.py', # Deactivated as no jobs in romania are available
'brillio.py', # there are no jobs available
'aeroportoradea.py', # Removed as they changed the page layout, to be fixed
'mennekes.py', # This does not have jobs at this moment
Expand Down
2 changes: 1 addition & 1 deletion sites/sonrisatechnologies.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def format_data(self):
sonrisatechnologies = sonrisatechnologiesScraper()
sonrisatechnologies.get_response()
sonrisatechnologies.scrape_jobs()
sonrisatechnologies.sent_to_future()
# sonrisatechnologies.sent_to_future()



0 comments on commit de9e617

Please sign in to comment.