pax_global_header 0000666 0000000 0000000 00000000064 14042356110 0014506 g ustar 00root root 0000000 0000000 52 comment=18d41565f955028f9fcd2f6cc437f5f1cb717401
woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-larousse/ 0000775 0000000 0000000 00000000000 14042356110 0022634 5 ustar 00root root 0000000 0000000 woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-larousse/modules/ 0000775 0000000 0000000 00000000000 14042356110 0024304 5 ustar 00root root 0000000 0000000 woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-larousse/modules/larousse/ 0000775 0000000 0000000 00000000000 14042356110 0026141 5 ustar 00root root 0000000 0000000 woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-larousse/modules/larousse/__init__.py 0000664 0000000 0000000 00000001503 14042356110 0030251 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2017 Vincent A
#
# This file is part of a woob module.
#
# This woob 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 woob 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 woob module. If not, see .
from .module import LarousseModule
__all__ = ['LarousseModule']
woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-larousse/modules/larousse/browser.py 0000664 0000000 0000000 00000003063 14042356110 0030200 0 ustar 00root root 0000000 0000000 # -*- coding: utf-8 -*-
# Copyright(C) 2017 Vincent A
#
# This file is part of a woob module.
#
# This woob 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 woob 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 woob module. If not, see .
from woob.browser import PagesBrowser, URL
from woob.capabilities.translate import LanguageNotSupported
from .pages import LangList, WordPage
class LarousseBrowser(PagesBrowser):
BASEURL = 'https://www.larousse.fr'
langlist = URL('/dictionnaires/bilingues$', LangList)
word = URL(r'/dictionnaires/(?P\w+)-(?P\w+)/(?P.*)', WordPage)
LANGS = None
def _init(self):
if self.LANGS:
return
self.langlist.go()
self.LANGS = self.page.get_langs()
def translate(self, src, dst, word):
self._init()
try:
nsrc, ndst = self.LANGS[src, dst]
except KeyError:
raise LanguageNotSupported()
self.word.go(src=nsrc, dst=ndst, word=word)
return self.page.iter_translations(src=src, dst=dst)
woob-18d41565f955028f9fcd2f6cc437f5f1cb717401-modules-larousse/modules/larousse/favicon.png 0000664 0000000 0000000 00000024660 14042356110 0030304 0 ustar 00root root 0000000 0000000 PNG
IHDR >a bKGD pHYs tIMEF
* iTXtComment Created with GIMPd.e IDATx}yp5Mh1H^ T
ɭWaE/;a+ p\ 6` $kn
umYhI{G/oGY3Z_L,;c!E@ 0,0{IR.Ȓz''E0}RO (YMU@EC$PRH X'+MSKPJ9 |zbG"Xg60XQd(1H{d=ອZy`!NNP(Jx1DAYG!
@kmom)|a0 "QGiҏ
0 `^p0XO Ë]_0-[]R4x _0:n/`\<4ԲB~|p8],,e
@cwC?8ɣ@'}$mĊ`xr:wLZEe \Q .2,qx 0jQ߇y
ɶX8*l
J~J)%B ' ux2_-P ݟ<6/n@5
%7~~v)!.
>{,@S )%սdG@R.AɍL>t""UDx !ra*26CxzBc( _
bg7`X"mc#DdM Q4( rв ÜJ!9C9G}ןCX p"BP*P, (e9SS s
:
i#jjΕ