Skip to content
Commits on Source (5)
coverage==4.2
flake8==3.2.1
future==0.16.0
mock==2.0.0
nose==1.3.7
pyflakes==1.3.0
six==1.10.0
xunitparser==1.3.3
PrettyTable
sphinx
simplejson
python-jose
feedparser
geopy
google-api-python-client
pycryptodomex
before_script:
- "pip install -r .ci/requirements.txt"
- "REQUIREMENTS=$(mktemp) && python setup.py requirements > ${REQUIREMENTS} && pip install -r ${REQUIREMENTS} && rm ${REQUIREMENTS}"
- "pip install -r .ci/requirements_modules.txt"
build:2.7:
image: "python:2.7"
stage: "build"
script:
- "./tools/local_install.sh -2 ~/bin"
pyflakes:2.7:
image: "python:2.7"
stage: "test"
script:
- "./tools/pyflakes.sh -2"
lint:2.7:
image: "python:2.7"
stage: "test"
allow_failure: true
script:
- "./tools/weboob_lint.sh -2"
unittests:2.7:
image: "python:2.7"
stage: "test"
script:
- "./tools/run_tests.sh -2 --no-modules"
unittests-modules:2.7:
image: "python:2.7"
stage: "test"
allow_failure: true
script:
- "./tools/run_tests.sh -2 --no-core"
doc:2.7:
image: "python:2.7"
stage: "deploy"
script:
- "cd ./docs && make html"
build:3:
image: "python:3"
stage: "build"
script:
- "./tools/local_install.sh ~/bin"
pyflakes:3:
image: "python:3"
stage: "test"
script:
- "./tools/pyflakes.sh"
lint:3:
image: "python:3"
stage: "test"
allow_failure: true
script:
- "./tools/weboob_lint.sh"
unittests:3:
image: "python:3"
stage: "test"
script:
- "./tools/run_tests.sh --no-modules"
unittests-modules:3:
image: "python:3"
stage: "test"
allow_failure: true
script:
- "./tools/run_tests.sh --no-core"
doc:3:
image: "python:3"
stage: "deploy"
script:
- "cd ./docs && make html"
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
mQGiBEZvDQMRBACcSc5xvGE7EnAFonjB9P2U66xk3kL7grVJTvxdiY6ErwaqfRU0
XFSzwTnRoaQQFk//l+ctVaZ/Ex39y9lmivJLF4ME2RghIXTenJqbr6NQfnYIcPbx
fKo+S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1gLNWWyW2iNljDF
KiLhXstA/eNC3qC0IVJvbWFpbiBCaWdub24gPHJvbWFpbkBzeW1saW5rLm1lPokB
OAQTAQIAIgUCTXK1SgIbLwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ8a5s
CGs03G2b6Qf/VjmEs0pBdpg/Ewj7HmikxIQ7lvX5um1YHjLyLNdp6W6wylmzh3u5
dsaajEWmPbUhaDre7gTtxPNJFs6FXksfquUiZySXA45R+XH8Qh/TWJAY8FjdaZwB
tgOn4rka+n0rQeG1fklHw4Z3AREm/GmfeA63nkmS5SvdXskAz1iXB20Hyb6bGy5b
Y7ZJNhJ8Ocz2THizc2od3Bx8Pzw3DHs+NaW5sK/NJJN9QgpdLA4lo0KeidCALEXF
CReDEaT4Cs/Ds3u8QkuR+s+8qN5BOYcIWz79T/hLFw46SezEz9gjJ+NR1nIMd2um
bwnyciYEGVOfG4DsU/IRwnbk+HWcLNTFnw==
=mTlW
-----END PGP PUBLIC KEY BLOCK-----
# -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# 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 <http://www.gnu.org/licenses/>.
from .module import SevenFiftyGramsModule
__all__ = ['SevenFiftyGramsModule']
# -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# 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 <http://www.gnu.org/licenses/>.
from weboob.browser.exceptions import BrowserHTTPNotFound
from weboob.browser import PagesBrowser, URL
from .pages import RecipePage, ResultsPage
__all__ = ['SevenFiftyGramsBrowser']
class SevenFiftyGramsBrowser(PagesBrowser):
BASEURL = 'https://www.750g.com'
search = URL('/recettes_(?P<pattern>.*).htm', ResultsPage)
recipe = URL('/(?P<id>.*).htm', RecipePage)
def iter_recipes(self, pattern):
try:
self.search.go(pattern=pattern.replace(' ', '_'))
except BrowserHTTPNotFound:
return []
if isinstance(self.page, ResultsPage):
return self.page.iter_recipes()
return [self.get_recipe_content()]
def get_recipe(self, id, recipe=None):
try:
self.recipe.go(id=id)
return self.get_recipe_content(recipe)
except BrowserHTTPNotFound:
return
def get_recipe_content(self, recipe=None):
recipe = self.page.get_recipe(obj=recipe)
comments = list(self.page.get_comments())
if comments:
recipe.comments = comments
return recipe
# -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# 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 <http://www.gnu.org/licenses/>.
from weboob.capabilities.recipe import CapRecipe, Recipe
from weboob.tools.backend import Module
from weboob.tools.compat import unicode
from .browser import SevenFiftyGramsBrowser
import unicodedata
def strip_accents(s):
return ''.join(c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn')
__all__ = ['SevenFiftyGramsModule']
class SevenFiftyGramsModule(Module, CapRecipe):
NAME = '750g'
MAINTAINER = u'Julien Veyssier'
EMAIL = 'julien.veyssier@aiur.fr'
VERSION = '1.6'
DESCRIPTION = u'750g French recipe website'
LICENSE = 'AGPLv3+'
BROWSER = SevenFiftyGramsBrowser
def get_recipe(self, id):
return self.browser.get_recipe(id)
def iter_recipes(self, pattern):
return self.browser.iter_recipes(strip_accents(unicode(pattern)).encode('utf-8'))
def fill_recipe(self, recipe, fields):
if 'nb_person' in fields or 'instructions' in fields:
recipe = self.browser.get_recipe(recipe.id, recipe)
return recipe
OBJECTS = {
Recipe: fill_recipe,
}
# -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# 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 <http://www.gnu.org/licenses/>.
from weboob.capabilities.recipe import Recipe, Comment
from weboob.capabilities.base import NotAvailable
from weboob.capabilities.image import BaseImage, Thumbnail
from weboob.browser.pages import HTMLPage, pagination
from weboob.browser.elements import ItemElement, ListElement, method
from weboob.browser.filters.standard import CleanText, Regexp, Env, CleanDecimal, Eval
from weboob.browser.filters.json import Dict, NotFound
from datetime import datetime, date, time
from dateutil.parser import parse as parse_date
from weboob.tools.json import json
class Time(Dict):
def filter(self, el):
if el and not isinstance(el, NotFound):
el = el.replace('PT', '')
if el == u'P':
return NotAvailable
_time = parse_date(el, dayfirst=False, fuzzy=False)
_time = _time - datetime.combine(date.today(), time(0))
return _time.seconds // 60
class ResultsPage(HTMLPage):
""" Page which contains results as a list of recipies
"""
@pagination
@method
class iter_recipes(ListElement):
item_xpath = '//section[has-class("c-recipe-row")]'
def next_page(self):
return CleanText('//li[@class="suivante"]/a/@href')(self)
class item(ItemElement):
klass = Recipe
def condition(self):
return not CleanText('./div[@class="c-recipe-row__media"]/span[@class="c-recipe-row__video"]/@class',
default=None)(self) and CleanText('./div/h2/a/@href')(self)
obj_id = Regexp(CleanText('./div/h2/a/@href'),
'/(.*).htm')
obj_title = CleanText('./div/h2/a')
class obj_picture(ItemElement):
klass = BaseImage
obj_thumbnail = Eval(Thumbnail, CleanText('./div/img/@src'))
obj_short_description = CleanText('./div/p')
class RecipePage(HTMLPage):
""" Page which contains a recipe
"""
@method
class get_comments(ListElement):
item_xpath = '//div[has-class("c-comment__row")]'
class item(ItemElement):
klass = Comment
def validate(self, obj):
return obj.id
obj_id = CleanText('./@data-id')
obj_author = CleanText('./article/div/header/strong/span[@itemprop="author"]')
obj_text = CleanText('./article/div/div/p')
@method
class get_recipe(ItemElement):
klass = Recipe
def parse(self, el):
json_content = CleanText('//head/script[@type="application/ld+json"]')(el)
self.el = json.loads(json_content)
obj_id = Env('id')
obj_title = Dict('name')
obj_ingredients = Dict('recipeIngredient')
obj_cooking_time = Time('cookTime')
obj_preparation_time = Time('prepTime')
def obj_nb_person(self):
return [CleanDecimal(Dict('recipeYield'), default=0)(self)]
obj_instructions = Dict('recipeInstructions')
obj_author = Dict('author/name', default=NotAvailable)
def obj_picture(self):
img = BaseImage()
try:
img.url = self.el['image']
except KeyError:
return
return img
# -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# 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 <http://www.gnu.org/licenses/>.
from weboob.tools.test import BackendTest
import itertools
class SevenFiftyGramsTest(BackendTest):
MODULE = '750g'
def test_recipe(self):
recipes = list(itertools.islice(self.backend.iter_recipes('fondue'), 0, 20))
for recipe in recipes:
full_recipe = self.backend.get_recipe(recipe.id)
self.assertTrue(full_recipe.instructions, 'No instructions for %s' % recipe.id)
self.assertTrue(full_recipe.ingredients, 'No ingredients for %s' % recipe.id)
self.assertTrue(full_recipe.title, 'No title for %s' % recipe.id)
self.assertTrue(full_recipe.preparation_time, 'No preparation time for %s' % recipe.id)
# -*- 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 <http://www.gnu.org/licenses/>.
from .module import AdeccoModule
__all__ = ['AdeccoModule']
# -*- 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 <http://www.gnu.org/licenses/>.
from weboob.browser import PagesBrowser, URL
from weboob.tools.compat import quote_plus
from .pages import SearchPage, AdvertPage, AdvertsJsonPage
from datetime import date, timedelta
__all__ = ['AdeccoBrowser']
class AdeccoBrowser(PagesBrowser):
BASEURL = 'https://www.adecco.fr'
TIMEOUT = 30
search_page = URL('/resultats-offres-emploi/\?k=(?P<job>.*)&l=(?P<town>.*)&display=50',
'/resultats-offres-emploi/(?P<q>.*)/\?display=50',
SearchPage)
json_page = URL('/AdeccoGroup.Global/api/Job/AsynchronousJobSearch/', AdvertsJsonPage)
advert_page = URL('/offres-d-emploi/\?ID=(?P<_id>.*)',
'/offres-d-emploi/.*',
AdvertPage)
def call_json(self, params, date_min=None):
self.session.headers.update({"Accept": "application/json, text/javascript, */*; q=0.01",
"X-Requested-With": "XMLHttpRequest"})
return self.json_page.go(data=params).iter_job_adverts(data=params, date_min=date_min)
def search_job(self, pattern=None):
if pattern:
return self.advanced_search_job(job=pattern)
return []
def advanced_search_job(self, publication_date=0, contract_type=None, conty=None, activity_domain=None,
job='', town=''):
params = self.search_page.go(job=quote_plus(job.encode('utf-8')),
town=quote_plus(town.encode('utf-8'))).get_post_params()
if contract_type:
self.page.url += '&employmenttype=%s' % contract_type
if conty:
self.page.url += '&countrysubdivisionfacet=%s' % conty
if activity_domain:
self.page.url += '&industryfacet=%s' % activity_domain
date_min = date.today() - timedelta(days=publication_date) if publication_date > 0 else None
params['filterUrl'] = self.page.url
return self.call_json(params, date_min=date_min)
def get_job_advert(self, _id, advert):
return self.advert_page.go(_id=_id).get_job_advert(obj=advert)
# -*- 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 <http://www.gnu.org/licenses/>.
from collections import OrderedDict
from weboob.tools.backend import Module, BackendConfig
from weboob.tools.value import Value
from weboob.capabilities.job import CapJob, BaseJobAdvert
from .browser import AdeccoBrowser
__all__ = ['AdeccoModule']
class AdeccoModule(Module, CapJob):
NAME = 'adecco'
DESCRIPTION = u'adecco website'
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
VERSION = '1.6'
BROWSER = AdeccoBrowser
publicationDate_choices = OrderedDict([(k, u'%s' % (v)) for k, v in sorted({
'000000': u'-- Indifferent --',
'2': u'Moins de 48 heures',
'7': u'Moins de 1 semaine',
'14': u'Moins de 2 semaines',
}.items())])
type_contract_choices = OrderedDict([(k, u'%s' % (v)) for k, v in sorted({
'': u'-- Indifferent --',
'ADCFREMP005': u'CDD',
'ADCFREMP004': u'CDI',
'ADCFREMP003': u'Intérim',
'ADCFREMP009': u'Autres',
'ADCFREMP010': u'Libéral',
}.items())])
places_choices = OrderedDict([(k, u'%s' % (v)) for k, v in sorted({
'': u'-- Indifferent --',
'AIN': u'Ain',
'AISNE': u'Aisne',
'ALLIER': u'Allier',
'ALPES-DE-HAUTE-PROVENCE': u'Alpes-De-Haute-Provence',
'ALPES-MARITIMES': u'Alpes-Maritimes',
'ARDECHE': u'Ardeche',
'ARDENNES': u'Ardennes',
'ARIEGE': u'Ariege',
'AUBE': u'Aube',
'AUDE': u'Aude',
'AVEYRON': u'Aveyron',
'BAS-RHIN': u'Bas-Rhin',
'BOUCHES-DU-RHONE': u'Bouches-Du-Rhone',
'CALVADOS': u'Calvados',
'CANTAL': u'Cantal',
'CHARENTE': u'Charente',
'CHARENTE-MARITIME': u'Charente-Maritime',
'CHER': u'Cher',
'CORREZE': u'Correze',
'CORSE-DU-SUD': u'Corse du Sud',
'COTE-D%27OR': u'Cote D\'Or',
'COTES-D%27ARMOR': u'Cotes D\'Armor',
'CREUSE': u'Creuse',
'DEUX-SEVRES': u'Deux-Sevres',
'DORDOGNE': u'Dordogne',
'DOUBS': u'Doubs',
'DROME': u'Drome',
'ESSONNE': u'Essonne',
'EURE': u'Eure',
'EURE-ET-LOIR': u'Eure-Et-Loir',
'FINISTERE': u'Finistere',
'GARD': u'Gard',
'GERS': u'Gers',
'GIRONDE': u'Gironde',
'GUADELOUPE': u'Guadeloupe',
'GUYANE': u'Guyane',
'HAUT-RHIN': u'Haut-Rhin',
'HAUTE-CORSE': u'Haute-Corse',
'HAUTE-GARONNE': u'Haute-Garonne',
'HAUTE-LOIRE': u'Haute-Loire',
'HAUTE-MARNE': u'Haute-Marne',
'HAUTE-SAONE': u'Haute-Saone',
'HAUTE-SAVOIE': u'Haute-Savoie',
'HAUTE-VIENNE': u'Haute-Vienne',
'HAUTES-ALPES': u'Hautes-Alpes',
'HAUTES-PYRENEES': u'Hautes-Pyrenees',
'HAUTS-DE-SEINE': u'Hauts-De-Seine',
'HERAULT': u'Herault',
'ILLE-ET-VILAINE': u'Ille-Et-Vilaine',
'INDRE': u'Indre',
'INDRE-ET-LOIRE': u'Indre-Et-Loire',
'ISERE': u'Isere',
'JURA': u'Jura',
'LA+REUNION': u'La Reunion',
'LANDES': u'Landes',
'LOIR-ET-CHER': u'Loir-Et-Cher',
'LOIRE': u'Loire',
'LOIRE-ATLANTIQUE': u'Loire-Atlantique',
'LOIRET': u'Loiret',
'LOT': u'Lot',
'LOT-ET-GARONNE': u'Lot-Et-Garonne',
'LOZERE': u'Lozere',
'MAINE-ET-LOIRE': u'Maine-Et-Loire',
'MANCHE': u'Manche',
'MARNE': u'Marne',
'MARTINIQUE': u'Martinique',
'MAYENNE': u'Mayenne',
'MAYOTTE': u'Mayotte',
'MEURTHE-ET-MOSELLE': u'Meurthe et Moselle',
'MEUSE': u'Meuse',
'MONACO': u'Monaco',
'MORBIHAN': u'Morbihan',
'MOSELLE': u'Moselle',
'NIEVRE': u'Nievre',
'NORD': u'Nord',
'OISE': u'Oise',
'ORNE': u'Orne',
'PARIS': u'Paris',
'PAS-DE-CALAIS': u'Pas-de-Calais',
'PUY-DE-DOME': u'Puy-de-Dome',
'PYRENEES-ATLANTIQUES': u'Pyrenees-Atlantiques',
'PYRENEES-ORIENTALES': u'Pyrenees-Orientales',
'RHONE': u'Rhone',
'SAONE-ET-LOIRE': u'Saone-et-Loire',
'SARTHE': u'Sarthe',
'SAVOIE': u'Savoie',
'SEINE-ET-MARNE': u'Seine-et-Marne',
'SEINE-MARITIME': u'Seine-Maritime',
'SEINE-SAINT-DENIS': u'Seine-Saint-Denis',
'SOMME': u'Somme',
'ST+PIERRE+ET+MIQUELON': u'St Pierre et Miquelon',
'SUISSE': u'Suisse',
'TARN': u'Tarn',
'TARN-ET-GARONNE': u'Tarn-et-Garonne',
'TERRITOIRE+DE+BELFORT': u'Territoire de Belfort',
'VAL-D%27OISE': u'Val-D\'Oise',
'VAL-DE-MARNE': u'Val-De-Marne',
'VAR': u'Var',
'VAUCLUSE': u'Vaucluse',
'VENDEE': u'Vendee',
'VIENNE': u'Vienne',
'VOSGES': u'Vosges',
'YONNE': u'Yonne',
'YVELINES': u'Yvelines',
}.items())])
activityDomain_choices = OrderedDict([(k, u'%s' % (v)) for k, v in sorted({
'Z': '-- Indifferent --',
'A': u'Accueil - Secrétariat - Fonctions Administratives',
'B': u'Achats - Juridique - Qualité - RH - Direction',
'C': u'Agriculture - Viticulture - Pêche - Espaces Verts',
'D': u'Automobile',
'E': u'Banque - Finance - Gestion Comptabilité - Assurance',
'F': u'Bâtiment - Travaux Publics - Architecture - Immobilier',
'G': u'Bureaux d\'Etudes - Méthodes',
'H': u'Commerce - Vente - Grande Distribution',
'I': u'Environnement - Nettoyage - Sécurité',
'J': u'Hôtellerie - Restauration - Métiers de Bouche',
'K': u'Industrie',
'L': u'Informatique - Technologie de l\'Information',
'M': u'Logistique - Manutention - Transport',
'N': u'Marketing - Communication - Imprimerie - Edition',
'O': u'Médical - Paramédical - Esthétique',
'P': u'Pharmacie (Industrie, Officine) - Recherche clinique',
'Q': u'Télémarketing - Téléservices',
'R': u'Tourisme - Loisirs - Spectacle - Audiovisuel',
}.items())])
CONFIG = BackendConfig(Value('job', label='Job name', masked=False, default=''),
Value('town', label='Town name', masked=False, default=''),
Value('place', label=u'County', choices=places_choices),
Value('publication_date', label=u'Publication Date', choices=publicationDate_choices),
Value('contract', labe=u'Contract type', choices=type_contract_choices),
Value('activity_domain', label=u'Activity Domain', choices=activityDomain_choices,
default=''),
)
def search_job(self, pattern=None):
for advert in self.browser.search_job(pattern):
yield advert
def advanced_search_job(self):
activity_domain = self.config['activity_domain'].get() if self.config['activity_domain'].get() != u'Z' else None
for advert in self.browser.advanced_search_job(publication_date=int(self.config['publication_date'].get()),
contract_type=self.config['contract'].get(),
conty=self.config['place'].get(),
activity_domain=activity_domain,
job=self.config['job'].get(),
town=self.config['town'].get()
):
yield advert
def get_job_advert(self, _id, advert=None):
return self.browser.get_job_advert(_id, advert)
def fill_obj(self, advert, fields):
return self.get_job_advert(advert.id, advert)
OBJECTS = {BaseJobAdvert: fill_obj}
# -*- 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 <http://www.gnu.org/licenses/>.
import requests
from weboob.browser.pages import HTMLPage, pagination, JsonPage
from weboob.browser.elements import ItemElement, method, DictElement
from weboob.browser.filters.standard import CleanText, Regexp, Date
from weboob.browser.filters.html import CleanHTML
from weboob.browser.filters.json import Dict
from weboob.browser.filters.javascript import JSVar
from weboob.capabilities.job import BaseJobAdvert
from weboob.capabilities.base import empty
class SearchPage(HTMLPage):
def get_post_params(self):
return {'facetSettingId': JSVar(CleanText('//script'), var='_FacetName')(self.doc),
'currentLanguage': JSVar(CleanText('//script'), var='_CurrentLanguage')(self.doc),
'clientId': JSVar(CleanText('//script'), var='_ClientId')(self.doc),
'branchId': JSVar(CleanText('//script'), var='_BranchId')(self.doc),
'clientName': JSVar(CleanText('//script'), var='_ClientName')(self.doc)}
class AdvertsJsonPage(JsonPage):
@pagination
@method
class iter_job_adverts(DictElement):
item_xpath = 'Items'
def next_page(self):
if len(self.page.doc['Pagination']) >= 2:
if self.page.doc['Pagination'][-2]['keyName'] == u'Suivant':
url = self.page.doc['Pagination'][-2]['valueName']
self.env['data']['filterUrl'] = u'http://www.adecco.fr%s' % url
return requests.Request("POST", self.page.url, data=self.env['data'])
class item(ItemElement):
klass = BaseJobAdvert
def validate(self, advert):
if empty(advert.publication_date) or not self.env['date_min']:
return advert
if advert.publication_date >= self.env['date_min']:
return advert
obj_id = Dict('JobId')
obj_title = Dict('JobTitle')
obj_place = Dict('JobLocation')
obj_publication_date = Date(Dict('PostedDate'))
class AdvertPage(HTMLPage):
@method
class get_job_advert(ItemElement):
klass = BaseJobAdvert
def obj_id(self):
_id = Regexp(CleanText('//meta[@property="og:url"]/@content'),
'.*\?ID=(.*)',
default=None)(self)
if _id is None:
_id = JSVar(CleanText('//script'), var='_JobDetailsId')(self)
return _id
def obj_title(self):
title = CleanText('//meta[@property="og:title"]/@content',
default=None)(self)
if title is None:
title = JSVar(CleanText('//script'), var='_JobTitle')(self)
return title
def obj_place(self):
place = CleanText('//span[@itemprop="jobLocation"]', default=None)(self)
if not place:
place = CleanText('//li[@class="job--meta_location"]')(self)
if not place:
place = Regexp(CleanText('//meta[@property="og:title"]/@content'),
u'.*\ à (.*)')(self)
return place
def obj_publication_date(self):
date = Date(CleanText('//time[@itemprop="startDate"]'), default=None)(self)
if date is None:
date = Date(CleanText('//span[@id="posted-date"]'))(self)
return date
obj_contract_type = CleanText('//li[@class="job--meta_employment-type"]/div/div/span[@class="job-details-value"]')
# obj_pay = CleanText('//div[@class="jobGreyContain"]/div/div[4]/span[@class="value"]')
def obj_job_name(self):
job_name = Regexp(CleanText('//meta[@property="og:title"]/@content'),
'(.*)\|.*', default=None)(self)
if job_name is None:
job_name = JSVar(CleanText('//script'), var='_JobTitle')(self)
return job_name
obj_description = CleanHTML('//div[@class="VacancyDescription"]')
def obj_url(self):
url = CleanText('//meta[@property="og:url"]/@content', default=None)(self)
if url is None:
url = JSVar(CleanText('//script'), var='_JobUrl')(self)
if not url.startswith('http'):
url = 'www.adecco.fr%s' % url
return url
# -*- 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 <http://www.gnu.org/licenses/>.
from weboob.tools.test import BackendTest
from weboob.tools.value import Value
import itertools
class AdeccoTest(BackendTest):
MODULE = 'adecco'
def setUp(self):
if not self.is_backend_configured():
self.backend.config['publication_date'] = Value(value='000000')
self.backend.config['place'] = Value(value='')
self.backend.config['job'] = Value(value='')
self.backend.config['town'] = Value(value='')
self.backend.config['contract'] = Value(value='ADCFREMP004')
def test_adecco_search(self):
l = list(itertools.islice(self.backend.search_job(u'manutentionnaire'), 0, 20))
assert len(l)
advert = self.backend.get_job_advert(l[0].id, None)
self.assertTrue(advert.url, 'URL for announce "%s" not found: %s' % (advert.id, advert.url))
def test_adecco_advanced_search(self):
l = list(itertools.islice(self.backend.advanced_search_job(), 0, 20))
assert len(l)
advert = self.backend.get_job_advert(l[0].id, None)
self.assertTrue(advert.url, 'URL for announce "%s" not found: %s' % (advert.id, advert.url))
# -*- coding: utf-8 -*-
# Copyright(C) 2015 James GALT
#
# 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 Lesser 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from .module import AferModule
__all__ = ['AferModule']
# -*- coding: utf-8 -*-
# Copyright(C) 2012-2019 Budget Insight
#
# 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 Lesser 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from weboob.browser import AbstractBrowser
class AferBrowser(AbstractBrowser):
PARENT = 'aviva'
PARENT_ATTR = 'package.browser.AvivaBrowser'
BASEURL = 'https://adherent.gie-afer.fr'
def __init__(self, *args, **kwargs):
self.subsite = 'espaceadherent'
super(AferBrowser, self).__init__(*args, **kwargs)