pax_global_header 0000666 0000000 0000000 00000000064 13400741301 0014503 g ustar 00root root 0000000 0000000 52 comment=309ae667efa3c8f7192ef6b744c295fbb8a2d101
woob-309ae667efa3c8f7192ef6b744c295fbb8a2d101-modules-googletranslate/ 0000775 0000000 0000000 00000000000 13400741301 0024400 5 ustar 00root root 0000000 0000000 woob-309ae667efa3c8f7192ef6b744c295fbb8a2d101-modules-googletranslate/modules/ 0000775 0000000 0000000 00000000000 13400741301 0026050 5 ustar 00root root 0000000 0000000 woob-309ae667efa3c8f7192ef6b744c295fbb8a2d101-modules-googletranslate/modules/googletranslate/ 0000775 0000000 0000000 00000000000 13400741301 0031242 5 ustar 00root root 0000000 0000000 __init__.py 0000664 0000000 0000000 00000001511 13400741301 0033272 0 ustar 00root root 0000000 0000000 woob-309ae667efa3c8f7192ef6b744c295fbb8a2d101-modules-googletranslate/modules/googletranslate "GoogleTranslateModule init"
# -*- coding: utf-8 -*-
# Copyright(C) 2012 Lucien Loiseau
#
# This file is part of weboob.
#
# weboob 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.
#
# weboob 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 weboob. If not, see .
from .module import GoogleTranslateModule
__all__ = ['GoogleTranslateModule']
browser.py 0000664 0000000 0000000 00000003023 13400741301 0033216 0 ustar 00root root 0000000 0000000 woob-309ae667efa3c8f7192ef6b744c295fbb8a2d101-modules-googletranslate/modules/googletranslate # -*- coding: utf-8 -*-
# Copyright(C) 2012 Lucien Loiseau
#
# This file is part of weboob.
#
# weboob 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.
#
# weboob 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 weboob. If not, see .
from weboob.browser import PagesBrowser, URL
from .pages import TranslatePage
from .gtts_token import Token
__all__ = ['GoogleTranslateBrowser']
class GoogleTranslateBrowser(PagesBrowser):
BASEURL = 'https://translate.google.fr'
translate_page = URL('/translate_a/single\?client=t&sl=(?P