pax_global_header 0000666 0000000 0000000 00000000064 13434601454 0014516 g ustar 00root root 0000000 0000000 52 comment=d0a72914b1b13c7766ca764ce93a9d23b473bfe7
woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-apec/ 0000775 0000000 0000000 00000000000 13434601454 0022043 5 ustar 00root root 0000000 0000000 woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-apec/modules/ 0000775 0000000 0000000 00000000000 13434601454 0023513 5 ustar 00root root 0000000 0000000 woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-apec/modules/apec/ 0000775 0000000 0000000 00000000000 13434601454 0024423 5 ustar 00root root 0000000 0000000 woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-apec/modules/apec/__init__.py 0000664 0000000 0000000 00000001503 13434601454 0026533 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2013 Bezleputh
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This weboob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see .
from .module import ApecModule
__all__ = ['ApecModule']
woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-apec/modules/apec/browser.py 0000664 0000000 0000000 00000013111 13434601454 0026455 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2013 Bezleputh
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This weboob module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see .
from weboob.browser.profiles import Profile
from weboob.browser import PagesBrowser, URL
from .pages import IdsPage, OffrePage
__all__ = ['ApecBrowser']
class JsonProfile(Profile):
def setup_session(self, session):
session.headers["Content-Type"] = "application/json"
class ApecBrowser(PagesBrowser):
BASEURL = 'https://cadres.apec.fr'
PROFILE = JsonProfile()
start = 0
json_count = URL('/cms/webservices/rechercheOffre/count', IdsPage)
json_ids = URL('/cms/webservices/rechercheOffre/ids', IdsPage)
json_offre = URL('/cms/webservices/offre/public\?numeroOffre=(?P<_id>.*)', OffrePage)
def create_parameters(self, pattern='', fonctions='[]', lieux='[]', secteursActivite='[]', typesContrat='[]',
typesConvention='[]', niveauxExperience='[]', salaire_min='', salaire_max='',
date_publication='', start=0, range=20):
if date_publication:
date_publication = ',"anciennetePublication":%s' % (date_publication)
if salaire_max:
salaire_max = ',"salaireMaximum":%s' % (salaire_max)
if salaire_min:
salaire_min = ',"salaireMinimum":%s' % (salaire_min)
return '{"activeFiltre":true,"motsCles":"%s","fonctions":%s,"lieux":%s,"pointGeolocDeReference":{},"secteursActivite":%s,"typesContrat":%s,"typesConvention":%s,"niveauxExperience":%s%s%s%s,"sorts":[{"type":"SCORE","direction":"DESCENDING"}],"pagination":{"startIndex":%s,"range":%s},"typeClient":"CADRE"}' % (pattern, fonctions, lieux, secteursActivite, typesContrat, typesConvention, niveauxExperience, salaire_min, salaire_max, date_publication, start, range)
def search_job(self, pattern=None):
data = self.create_parameters(pattern=pattern).encode('utf-8')
return self.get_job_adverts(data, pattern=pattern)
def get_job_adverts(self, data, pattern='', lieux='', fonctions='', secteursActivite='', salaire_min='',
salaire_max='', typesContrat='', date_publication='', niveauxExperience='', typesConvention=''):
count = self.json_count.go(data=data).get_adverts_number()
self.start = 0
if count:
ids = self.json_ids.go(data=data).iter_job_adverts(pattern=pattern,
fonctions='[%s]' % fonctions,
lieux='[%s]' % lieux,
secteursActivite='[%s]' % secteursActivite,
typesContrat='[%s]' % typesContrat,
niveauxExperience='[%s]' % niveauxExperience,
typesConvention='[%s]' % typesConvention,
salaire_min=salaire_min,
salaire_max=salaire_max,
date_publication=date_publication,
start=self.start,
count=count,
range=20)
for _id in ids:
yield self.json_offre.go(_id=_id.id).get_job_advert()
def get_job_advert(self, _id, advert=None):
return self.json_offre.go(_id=_id).get_job_advert(obj=advert)
def advanced_search_job(self, region='', fonction='', secteur='', salaire='', contrat='', limit_date='', level=''):
salaire_max = ''
salaire_min = ''
if salaire:
s = salaire.split('|')
salaire_max = s[1]
salaire_min = s[0]
data = self.create_parameters(fonctions='[%s]' % fonction,
lieux='[%s]' % region,
secteursActivite='[%s]' % secteur,
typesContrat='[%s]' % contrat,
niveauxExperience='[%s]' % level,
salaire_min=salaire_min,
salaire_max=salaire_max,
date_publication=limit_date)
return self.get_job_adverts(data,
fonctions=fonction,
lieux=region,
secteursActivite=secteur,
typesContrat=contrat,
niveauxExperience=level,
salaire_min=salaire_min,
salaire_max=salaire_max,
date_publication=limit_date)
woob-d0a72914b1b13c7766ca764ce93a9d23b473bfe7-modules-apec/modules/apec/favicon.png 0000664 0000000 0000000 00000017223 13434601454 0026563 0 ustar 00root root 0000000 0000000 PNG
IHDR @ @ iq bKGD pHYs od tIME}r IDATxy|]uLwhkeWNupLz&)*'N^$:J_&PI^2pnC 1J36 ϲ5ǹW
&Li>sw^komR "ƍRm*?DZ8rd|J)F\T7ŀuy6H.D۽w48nMl<3o#nnw߭߈q9 7?A
b:KY "ry}(G\ޞ
xUx#NOuIYq"Jk~˸hzwFna7j
g0$(P\@cG7E:2o }Ê=P$R`#1JuiS
(mĿ?@;
WyD]\;Dttmuz_VDg=9rp M cdEyI,2ƄDJyƤ#)"u@ 1&
йHP_;`}\d"&W8=$3fQ8iB!`tN:AB0b:Cʠ
ffE&vtɦH-ssu$sЩX_5utFLtW"q4֜ԅU Fգiuf_9:\'8u'xmm h@VD