Skip to content

Commit

Permalink
introduce a company filtering in cleanFields function
Browse files Browse the repository at this point in the history
close #51
  • Loading branch information
Yoann Sculo committed Nov 22, 2013
1 parent d19c5e8 commit 4f2e049
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jobcatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,9 +976,14 @@ def loadFromHtml(self, filename):

def cleanFields(self):
self.cleanContract()
self.cleanCompany()
self.cleanLocation()
self.cleanSalary()

def cleanCompany(self):
self.company = utilities.filter_company_fr(self.company)
return

def cleanContract(self):
self.contract = utilities.filter_contract_fr(self.contract)
return
Expand Down
4 changes: 4 additions & 0 deletions utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@ def filter_contract_fr(contract):

return contract

def filter_company_fr(company):
company = re.sub(ur'^\(confidentiel\)$', 'NA', company, re.IGNORECASE)

This comment has been minimized.

Copy link
@yscialom

yscialom Nov 26, 2013

Collaborator

Great.
I also got a "www.adh.fr/offres-emploi.php Réf : B458" in my company list.
Remind me to move the NA company on top of all the others in the company list (see commit 654185c).

company = re.sub(ur'^confidentiel$', 'NA', company, re.IGNORECASE)
return company

def filter_location_fr(location):
location = re.sub(ur'IDF', "Île-de-France", location)
Expand Down

0 comments on commit 4f2e049

Please sign in to comment.