Skip to content

Commit

Permalink
Added pimcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
RaresCode committed Sep 27, 2023
1 parent 9278574 commit cfcb874
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
63 changes: 63 additions & 0 deletions sites/pimcopy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#
#
#
# pimcopy > https://pimcopy.ro/cariere

from sites.website_scraper_bs4 import BS4Scraper

class pimcopyScraper(BS4Scraper):

"""
A class for scraping job data from pimcopy website.
"""
url = 'https://pimcopy.ro/cariere'
url_logo = 'https://pimcopy.ro/assets/images/logo.png'
company_name = 'pimcopy'


def __init__(self):
"""
Initialize the BS4Scraper class.
"""
self.job_count = 1
super().__init__(self.company_name, self.url_logo)

def get_response(self):
self.get_content(self.url)

def scrape_jobs(self):
"""
Scrape job data from pimcopy website.
"""

job_elements = self.get_jobs_elements('css_', 'div.cell-8.contact-detalis > h3')

self.job_titles = self.get_jobs_details_text(job_elements)

self.format_data()

def sent_to_future(self):
self.send_to_viitor()

def return_data(self):
self.get_response()
self.scrape_jobs()
return self.formatted_data, self.company_name

def format_data(self):
"""
Iterate over all job details and send to the create jobs dictionary.
"""
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")
self.job_count += 1

if __name__ == "__main__":
pimcopy = pimcopyScraper()
pimcopy.get_response()
pimcopy.scrape_jobs()
pimcopy.sent_to_future()



1 change: 1 addition & 0 deletions tests/module_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
'mennekes': 'mennekesScraper',
'sinaps': 'sinapsScraper',
'affidearomania': 'affidearomaniaScraper',
'pimcopy': 'pimcopyScraper',

# Add more module names as needed
}

0 comments on commit cfcb874

Please sign in to comment.