Rename BaseBrowser to Browser
This commit is contained in:
parent
444d36eee8
commit
0088013ae1
132 changed files with 348 additions and 348 deletions
|
|
@ -65,7 +65,7 @@ In a module directory, there are commonly these files:
|
||||||
|
|
||||||
* **__init__.py** - needed in every python modules, it exports your :class:`Module <weboob.tools.backend.Module>` class.
|
* **__init__.py** - needed in every python modules, it exports your :class:`Module <weboob.tools.backend.Module>` class.
|
||||||
* **module.py** - defines the main class of your module, which derives :class:`Module <weboob.tools.backend.Module>`.
|
* **module.py** - defines the main class of your module, which derives :class:`Module <weboob.tools.backend.Module>`.
|
||||||
* **browser.py** - your browser, derived from :class:`BaseBrowser <weboob.tools.browser2.browser.BaseBrowser>`, is called by your module to interact with the supported website.
|
* **browser.py** - your browser, derived from :class:`Browser <weboob.tools.browser2.browser.Browser>`, is called by your module to interact with the supported website.
|
||||||
* **pages.py** - all website's pages handled by the browser are defined here
|
* **pages.py** - all website's pages handled by the browser are defined here
|
||||||
* **test.py** - functional tests
|
* **test.py** - functional tests
|
||||||
* **favicon.png** - a 64x64 transparent PNG icon
|
* **favicon.png** - a 64x64 transparent PNG icon
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserHTTPNotFound
|
from weboob.tools.browser import Browser, BrowserHTTPNotFound
|
||||||
|
|
||||||
from .pages import RecipePage, ResultsPage
|
from .pages import RecipePage, ResultsPage
|
||||||
|
|
||||||
|
|
@ -26,11 +26,11 @@ from .pages import RecipePage, ResultsPage
|
||||||
__all__ = ['SevenFiftyGramsBrowser']
|
__all__ = ['SevenFiftyGramsBrowser']
|
||||||
|
|
||||||
|
|
||||||
class SevenFiftyGramsBrowser(BaseBrowser):
|
class SevenFiftyGramsBrowser(Browser):
|
||||||
DOMAIN = 'www.750g.com'
|
DOMAIN = 'www.750g.com'
|
||||||
PROTOCOL = 'http'
|
PROTOCOL = 'http'
|
||||||
ENCODING = 'windows-1252'
|
ENCODING = 'windows-1252'
|
||||||
USER_AGENT = BaseBrowser.USER_AGENTS['wget']
|
USER_AGENT = Browser.USER_AGENTS['wget']
|
||||||
PAGES = {
|
PAGES = {
|
||||||
'http://www.750g.com/recettes_.*.htm': ResultsPage,
|
'http://www.750g.com/recettes_.*.htm': ResultsPage,
|
||||||
'http://www.750g.com/fiche_de_cuisine_complete.htm\?recettes_id=[0-9]*': RecipePage,
|
'http://www.750g.com/fiche_de_cuisine_complete.htm\?recettes_id=[0-9]*': RecipePage,
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from weboob.tools.browser.decorators import id2url
|
from weboob.tools.browser.decorators import id2url
|
||||||
from weboob.tools.browser import BaseBrowser
|
from weboob.tools.browser import Browser
|
||||||
from .job import AdeccoJobAdvert
|
from .job import AdeccoJobAdvert
|
||||||
from .pages import SearchPage, AdvertPage
|
from .pages import SearchPage, AdvertPage
|
||||||
import urllib
|
import urllib
|
||||||
|
|
@ -26,7 +26,7 @@ import urllib
|
||||||
__all__ = ['AdeccoBrowser']
|
__all__ = ['AdeccoBrowser']
|
||||||
|
|
||||||
|
|
||||||
class AdeccoBrowser(BaseBrowser):
|
class AdeccoBrowser(Browser):
|
||||||
PROTOCOL = 'http'
|
PROTOCOL = 'http'
|
||||||
DOMAIN = 'www.adecco.fr'
|
DOMAIN = 'www.adecco.fr'
|
||||||
ENCODING = None
|
ENCODING = None
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
from weboob.capabilities.base import NotAvailable, NotLoaded
|
from weboob.capabilities.base import NotAvailable, NotLoaded
|
||||||
from weboob.capabilities.cinema import Movie, Person
|
from weboob.capabilities.cinema import Movie, Person
|
||||||
from weboob.tools.browser import BaseBrowser
|
from weboob.tools.browser import Browser
|
||||||
from weboob.tools.json import json
|
from weboob.tools.json import json
|
||||||
import base64
|
import base64
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
@ -32,7 +32,7 @@ import urllib
|
||||||
__all__ = ['AllocineBrowser']
|
__all__ = ['AllocineBrowser']
|
||||||
|
|
||||||
|
|
||||||
class AllocineBrowser(BaseBrowser):
|
class AllocineBrowser(Browser):
|
||||||
DOMAIN = 'api.allocine.fr'
|
DOMAIN = 'api.allocine.fr'
|
||||||
PROTOCOL = 'http'
|
PROTOCOL = 'http'
|
||||||
ENCODING = 'utf-8'
|
ENCODING = 'utf-8'
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserHTTPNotFound
|
from weboob.tools.browser import Browser, BrowserHTTPNotFound
|
||||||
|
|
||||||
from .pages import RecipePage, ResultsPage, FourOFourPage
|
from .pages import RecipePage, ResultsPage, FourOFourPage
|
||||||
|
|
||||||
|
|
@ -26,11 +26,11 @@ from .pages import RecipePage, ResultsPage, FourOFourPage
|
||||||
__all__ = ['AllrecipesBrowser']
|
__all__ = ['AllrecipesBrowser']
|
||||||
|
|
||||||
|
|
||||||
class AllrecipesBrowser(BaseBrowser):
|
class AllrecipesBrowser(Browser):
|
||||||
DOMAIN = 'allrecipes.com'
|
DOMAIN = 'allrecipes.com'
|
||||||
PROTOCOL = 'http'
|
PROTOCOL = 'http'
|
||||||
ENCODING = 'utf-8'
|
ENCODING = 'utf-8'
|
||||||
USER_AGENT = BaseBrowser.USER_AGENTS['wget']
|
USER_AGENT = Browser.USER_AGENTS['wget']
|
||||||
PAGES = {
|
PAGES = {
|
||||||
'http://allrecipes.com/search/default.aspx\?qt=k&wt=.*&rt=r&origin=.*': ResultsPage,
|
'http://allrecipes.com/search/default.aspx\?qt=k&wt=.*&rt=r&origin=.*': ResultsPage,
|
||||||
'http://allrecipes.com/Recipe/.*/Detail.aspx': RecipePage,
|
'http://allrecipes.com/Recipe/.*/Detail.aspx': RecipePage,
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword
|
||||||
from weboob.capabilities.bill import Detail
|
from weboob.capabilities.bill import Detail
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from .pages import LoginPage, HomePage, AccountPage, LastPaymentsPage, PaymentDetailsPage, BillsPage
|
from .pages import LoginPage, HomePage, AccountPage, LastPaymentsPage, PaymentDetailsPage, BillsPage
|
||||||
|
|
@ -25,7 +25,7 @@ from .pages import LoginPage, HomePage, AccountPage, LastPaymentsPage, PaymentDe
|
||||||
__all__ = ['AmeliBrowser']
|
__all__ = ['AmeliBrowser']
|
||||||
|
|
||||||
|
|
||||||
class AmeliBrowser(BaseBrowser):
|
class AmeliBrowser(Browser):
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
DOMAIN = 'assure.ameli.fr'
|
DOMAIN = 'assure.ameli.fr'
|
||||||
ENCODING = None
|
ENCODING = None
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import urllib
|
import urllib
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword
|
||||||
from weboob.capabilities.bill import Detail
|
from weboob.capabilities.bill import Detail
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from .pages import LoginPage, HomePage, AccountPage, HistoryPage, BillsPage
|
from .pages import LoginPage, HomePage, AccountPage, HistoryPage, BillsPage
|
||||||
|
|
@ -26,7 +26,7 @@ from .pages import LoginPage, HomePage, AccountPage, HistoryPage, BillsPage
|
||||||
__all__ = ['AmeliProBrowser']
|
__all__ = ['AmeliProBrowser']
|
||||||
|
|
||||||
|
|
||||||
class AmeliProBrowser(BaseBrowser):
|
class AmeliProBrowser(Browser):
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
DOMAIN = 'espacepro.ameli.fr'
|
DOMAIN = 'espacepro.ameli.fr'
|
||||||
ENCODING = None
|
ENCODING = None
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
from urlparse import urlsplit, parse_qsl
|
from urlparse import urlsplit, parse_qsl
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword
|
||||||
|
|
||||||
from .pages import LoginPage, AccountsPage, TransactionsPage
|
from .pages import LoginPage, AccountsPage, TransactionsPage
|
||||||
|
|
||||||
|
|
@ -28,7 +28,7 @@ from .pages import LoginPage, AccountsPage, TransactionsPage
|
||||||
__all__ = ['AmericanExpressBrowser']
|
__all__ = ['AmericanExpressBrowser']
|
||||||
|
|
||||||
|
|
||||||
class AmericanExpressBrowser(BaseBrowser):
|
class AmericanExpressBrowser(Browser):
|
||||||
DOMAIN = 'global.americanexpress.com'
|
DOMAIN = 'global.americanexpress.com'
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
ENCODING = 'ISO-8859-1'
|
ENCODING = 'ISO-8859-1'
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from weboob.tools.browser.decorators import id2url
|
from weboob.tools.browser.decorators import id2url
|
||||||
from weboob.tools.browser import BaseBrowser
|
from weboob.tools.browser import Browser
|
||||||
import urllib
|
import urllib
|
||||||
from .pages import SearchPage, AdvertPage
|
from .pages import SearchPage, AdvertPage
|
||||||
from .job import ApecJobAdvert
|
from .job import ApecJobAdvert
|
||||||
|
|
@ -27,7 +27,7 @@ from .job import ApecJobAdvert
|
||||||
__all__ = ['ApecBrowser']
|
__all__ = ['ApecBrowser']
|
||||||
|
|
||||||
|
|
||||||
class ApecBrowser(BaseBrowser):
|
class ApecBrowser(Browser):
|
||||||
PROTOCOL = 'http'
|
PROTOCOL = 'http'
|
||||||
DOMAIN = 'www.apec.fr'
|
DOMAIN = 'www.apec.fr'
|
||||||
ENCODING = 'ISO-8859-1'
|
ENCODING = 'ISO-8859-1'
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword
|
||||||
|
|
||||||
from .pages import LoginPage, AccountsPage, OperationsPage
|
from .pages import LoginPage, AccountsPage, OperationsPage
|
||||||
|
|
||||||
|
|
@ -26,7 +26,7 @@ from .pages import LoginPage, AccountsPage, OperationsPage
|
||||||
__all__ = ['ApivieBrowser']
|
__all__ = ['ApivieBrowser']
|
||||||
|
|
||||||
|
|
||||||
class ApivieBrowser(BaseBrowser):
|
class ApivieBrowser(Browser):
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
DOMAIN = 'www.apivie.fr'
|
DOMAIN = 'www.apivie.fr'
|
||||||
ENCODING = None
|
ENCODING = None
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword
|
||||||
from weboob.tools.browser.decorators import id2url
|
from weboob.tools.browser.decorators import id2url
|
||||||
|
|
||||||
from .pages import VideoPage, IndexPage, LoginPage, LoginRedirectPage
|
from .pages import VideoPage, IndexPage, LoginPage, LoginRedirectPage
|
||||||
|
|
@ -28,7 +28,7 @@ from .video import ArretSurImagesVideo
|
||||||
__all__ = ['ArretSurImagesBrowser']
|
__all__ = ['ArretSurImagesBrowser']
|
||||||
|
|
||||||
|
|
||||||
class ArretSurImagesBrowser(BaseBrowser):
|
class ArretSurImagesBrowser(Browser):
|
||||||
PROTOCOL = 'http'
|
PROTOCOL = 'http'
|
||||||
DOMAIN = 'www.arretsurimages.net'
|
DOMAIN = 'www.arretsurimages.net'
|
||||||
ENCODING = None
|
ENCODING = None
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import urllib
|
||||||
from weboob.capabilities import NotAvailable
|
from weboob.capabilities import NotAvailable
|
||||||
from weboob.capabilities.image import BaseImage
|
from weboob.capabilities.image import BaseImage
|
||||||
from weboob.tools.json import json as simplejson
|
from weboob.tools.json import json as simplejson
|
||||||
from weboob.tools.browser import BaseBrowser
|
from weboob.tools.browser import Browser
|
||||||
from weboob.tools.browser.decorators import id2url
|
from weboob.tools.browser.decorators import id2url
|
||||||
|
|
||||||
from .pages import ArteLivePage, ArteLiveVideoPage
|
from .pages import ArteLivePage, ArteLiveVideoPage
|
||||||
|
|
@ -34,7 +34,7 @@ from .video import ArteVideo, ArteLiveVideo
|
||||||
__all__ = ['ArteBrowser']
|
__all__ = ['ArteBrowser']
|
||||||
|
|
||||||
|
|
||||||
class ArteBrowser(BaseBrowser):
|
class ArteBrowser(Browser):
|
||||||
DOMAIN = u'videos.arte.tv'
|
DOMAIN = u'videos.arte.tv'
|
||||||
ENCODING = None
|
ENCODING = None
|
||||||
PAGES = {r'http://concert.arte.tv/\w+': ArteLivePage,
|
PAGES = {r'http://concert.arte.tv/\w+': ArteLivePage,
|
||||||
|
|
@ -51,7 +51,7 @@ class ArteBrowser(BaseBrowser):
|
||||||
self.lang = lang
|
self.lang = lang
|
||||||
self.quality = quality
|
self.quality = quality
|
||||||
self.order = order
|
self.order = order
|
||||||
BaseBrowser.__init__(self, *args, **kwargs)
|
Browser.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
@id2url(ArteVideo.id2url)
|
@id2url(ArteVideo.id2url)
|
||||||
def get_video(self, url, video=None):
|
def get_video(self, url, video=None):
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserHTTPNotFound
|
from weboob.tools.browser import Browser, BrowserHTTPNotFound
|
||||||
|
|
||||||
from .pages import SubtitlesPage, SearchPage
|
from .pages import SubtitlesPage, SearchPage
|
||||||
|
|
||||||
|
|
@ -26,11 +26,11 @@ from .pages import SubtitlesPage, SearchPage
|
||||||
__all__ = ['AttilasubBrowser']
|
__all__ = ['AttilasubBrowser']
|
||||||
|
|
||||||
|
|
||||||
class AttilasubBrowser(BaseBrowser):
|
class AttilasubBrowser(Browser):
|
||||||
DOMAIN = 'davidbillemont3.free.fr'
|
DOMAIN = 'davidbillemont3.free.fr'
|
||||||
PROTOCOL = 'http'
|
PROTOCOL = 'http'
|
||||||
ENCODING = 'windows-1252'
|
ENCODING = 'windows-1252'
|
||||||
USER_AGENT = BaseBrowser.USER_AGENTS['wget']
|
USER_AGENT = Browser.USER_AGENTS['wget']
|
||||||
PAGES = {
|
PAGES = {
|
||||||
'http://search.freefind.com/find.html.*': SearchPage,
|
'http://search.freefind.com/find.html.*': SearchPage,
|
||||||
'http://davidbillemont3.free.fr/.*.htm': SubtitlesPage,
|
'http://davidbillemont3.free.fr/.*.htm': SubtitlesPage,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import re
|
||||||
import urllib
|
import urllib
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword, BrowserHTTPNotFound, BrowserUnavailable
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword, BrowserHTTPNotFound, BrowserUnavailable
|
||||||
from weboob.tools.json import json
|
from weboob.tools.json import json
|
||||||
from weboob.tools.date import local2utc
|
from weboob.tools.date import local2utc
|
||||||
from weboob.tools.misc import to_unicode
|
from weboob.tools.misc import to_unicode
|
||||||
|
|
@ -66,7 +66,7 @@ class AuMException(UserError):
|
||||||
self.code = code
|
self.code = code
|
||||||
|
|
||||||
|
|
||||||
class WebsiteBrowser(BaseBrowser):
|
class WebsiteBrowser(Browser):
|
||||||
def login(self):
|
def login(self):
|
||||||
data = {'username': self.username,
|
data = {'username': self.username,
|
||||||
'password': self.password,
|
'password': self.password,
|
||||||
|
|
@ -115,7 +115,7 @@ class WebsiteBrowser(BaseBrowser):
|
||||||
|
|
||||||
return profile
|
return profile
|
||||||
|
|
||||||
class AuMBrowser(BaseBrowser):
|
class AuMBrowser(Browser):
|
||||||
DOMAIN = 'www.adopteunmec.com'
|
DOMAIN = 'www.adopteunmec.com'
|
||||||
APIKEY = 'fb0123456789abcd'
|
APIKEY = 'fb0123456789abcd'
|
||||||
APITOKEN = 'DCh7Se53v8ejS8466dQe63'
|
APITOKEN = 'DCh7Se53v8ejS8466dQe63'
|
||||||
|
|
@ -131,7 +131,7 @@ class AuMBrowser(BaseBrowser):
|
||||||
|
|
||||||
def __init__(self, username, password, search_query, *args, **kwargs):
|
def __init__(self, username, password, search_query, *args, **kwargs):
|
||||||
kwargs['get_home'] = False
|
kwargs['get_home'] = False
|
||||||
BaseBrowser.__init__(self, username, password, *args, **kwargs)
|
Browser.__init__(self, username, password, *args, **kwargs)
|
||||||
|
|
||||||
# now we do authentication ourselves
|
# now we do authentication ourselves
|
||||||
#self.add_password('http://www.adopteunmec.com/api/', self.username, self.password)
|
#self.add_password('http://www.adopteunmec.com/api/', self.username, self.password)
|
||||||
|
|
@ -239,7 +239,7 @@ class AuMBrowser(BaseBrowser):
|
||||||
if e.getcode() in (410,):
|
if e.getcode() in (410,):
|
||||||
return BrowserHTTPNotFound
|
return BrowserHTTPNotFound
|
||||||
|
|
||||||
return BaseBrowser.get_exception(self, e)
|
return Browser.get_exception(self, e)
|
||||||
|
|
||||||
def home(self):
|
def home(self):
|
||||||
r = self.api_request('home/')
|
r = self.api_request('home/')
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword
|
||||||
|
|
||||||
from .pages import LoginPage, AccountsPage, TransactionsPage, CBTransactionsPage, UnavailablePage
|
from .pages import LoginPage, AccountsPage, TransactionsPage, CBTransactionsPage, UnavailablePage
|
||||||
|
|
||||||
|
|
@ -28,7 +28,7 @@ from .pages import LoginPage, AccountsPage, TransactionsPage, CBTransactionsPage
|
||||||
__all__ = ['AXABanque']
|
__all__ = ['AXABanque']
|
||||||
|
|
||||||
|
|
||||||
class AXABanque(BaseBrowser):
|
class AXABanque(Browser):
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
DOMAIN = 'www.axabanque.fr'
|
DOMAIN = 'www.axabanque.fr'
|
||||||
PAGES = {'https?://www.axabanque.fr/connexion/index.html.*': LoginPage,
|
PAGES = {'https?://www.axabanque.fr/connexion/index.html.*': LoginPage,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword, BrokenPageError
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword, BrokenPageError
|
||||||
|
|
||||||
from .pages import LoginPage, IndexPage, AccountsPage, CardsPage, TransactionsPage, \
|
from .pages import LoginPage, IndexPage, AccountsPage, CardsPage, TransactionsPage, \
|
||||||
UnavailablePage, RedirectPage, HomePage
|
UnavailablePage, RedirectPage, HomePage
|
||||||
|
|
@ -29,7 +29,7 @@ from .pages import LoginPage, IndexPage, AccountsPage, CardsPage, TransactionsPa
|
||||||
__all__ = ['BanquePopulaire']
|
__all__ = ['BanquePopulaire']
|
||||||
|
|
||||||
|
|
||||||
class BanquePopulaire(BaseBrowser):
|
class BanquePopulaire(Browser):
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
ENCODING = 'iso-8859-15'
|
ENCODING = 'iso-8859-15'
|
||||||
PAGES = {'https://[^/]+/auth/UI/Login.*': LoginPage,
|
PAGES = {'https://[^/]+/auth/UI/Login.*': LoginPage,
|
||||||
|
|
@ -55,7 +55,7 @@ class BanquePopulaire(BaseBrowser):
|
||||||
self.DOMAIN = website
|
self.DOMAIN = website
|
||||||
self.token = None
|
self.token = None
|
||||||
|
|
||||||
BaseBrowser.__init__(self, *args, **kwargs)
|
Browser.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
def is_logged(self):
|
def is_logged(self):
|
||||||
return not self.is_on_page(LoginPage)
|
return not self.is_on_page(LoginPage)
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword
|
||||||
|
|
||||||
from .pages import LoginPage, Login2Page, IndexPage, AccountsPage, TransactionsPage, \
|
from .pages import LoginPage, Login2Page, IndexPage, AccountsPage, TransactionsPage, \
|
||||||
CardPage, ValuationPage, LoanPage, MarketPage
|
CardPage, ValuationPage, LoanPage, MarketPage
|
||||||
|
|
@ -27,7 +27,7 @@ from .pages import LoginPage, Login2Page, IndexPage, AccountsPage, TransactionsP
|
||||||
__all__ = ['Barclays']
|
__all__ = ['Barclays']
|
||||||
|
|
||||||
|
|
||||||
class Barclays(BaseBrowser):
|
class Barclays(Browser):
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
DOMAIN = 'www.barclays.fr'
|
DOMAIN = 'www.barclays.fr'
|
||||||
PAGES = {'https?://.*.barclays.fr/\d-index.html': IndexPage,
|
PAGES = {'https?://.*.barclays.fr/\d-index.html': IndexPage,
|
||||||
|
|
@ -44,7 +44,7 @@ class Barclays(BaseBrowser):
|
||||||
def __init__(self, secret, *args, **kwargs):
|
def __init__(self, secret, *args, **kwargs):
|
||||||
self.secret = secret
|
self.secret = secret
|
||||||
|
|
||||||
BaseBrowser.__init__(self, *args, **kwargs)
|
Browser.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
def is_logged(self):
|
def is_logged(self):
|
||||||
return self.page is not None and not self.is_on_page((LoginPage, IndexPage, Login2Page))
|
return self.page is not None and not self.is_on_page((LoginPage, IndexPage, Login2Page))
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import urllib
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from logging import warning
|
from logging import warning
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword, BrowserPasswordExpired
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword, BrowserPasswordExpired
|
||||||
from weboob.capabilities.bank import TransferError, Transfer
|
from weboob.capabilities.bank import TransferError, Transfer
|
||||||
|
|
||||||
from .perso.accounts_list import AccountsList, AccountPrelevement
|
from .perso.accounts_list import AccountsList, AccountPrelevement
|
||||||
|
|
@ -36,7 +36,7 @@ from .pro import ProAccountsList, ProAccountHistory
|
||||||
__all__ = ['BNPorc']
|
__all__ = ['BNPorc']
|
||||||
|
|
||||||
|
|
||||||
class BNPorc(BaseBrowser):
|
class BNPorc(Browser):
|
||||||
DOMAIN = 'www.secure.bnpparibas.net'
|
DOMAIN = 'www.secure.bnpparibas.net'
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
CERTHASH = ['5511f0ff19c982b6351c17b901bfa7419f075edb13f2df41e446248beb7866bb', 'fa8cb72ef2e46054469af916f7ec222b1904901fecde8511a0f769ba0385410d', '86cd4ba8cfbc53937dfc402e8c2d0a2d5ffb630a73bbeafd09c39f8b54a6a6c3']
|
CERTHASH = ['5511f0ff19c982b6351c17b901bfa7419f075edb13f2df41e446248beb7866bb', 'fa8cb72ef2e46054469af916f7ec222b1904901fecde8511a0f769ba0385410d', '86cd4ba8cfbc53937dfc402e8c2d0a2d5ffb630a73bbeafd09c39f8b54a6a6c3']
|
||||||
|
|
@ -66,7 +66,7 @@ class BNPorc(BaseBrowser):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.rotating_password = kwargs.pop('rotating_password', None)
|
self.rotating_password = kwargs.pop('rotating_password', None)
|
||||||
self.password_changed_cb = kwargs.pop('password_changed_cb', None)
|
self.password_changed_cb = kwargs.pop('password_changed_cb', None)
|
||||||
BaseBrowser.__init__(self, *args, **kwargs)
|
Browser.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
def home(self):
|
def home(self):
|
||||||
self.location('https://www.secure.bnpparibas.net/banque/portail/particulier/HomeConnexion?type=homeconnex')
|
self.location('https://www.secure.bnpparibas.net/banque/portail/particulier/HomeConnexion?type=homeconnex')
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,14 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword
|
||||||
|
|
||||||
from .pages import LoginPage, AccountsPage, HistoryPage, UnknownPage
|
from .pages import LoginPage, AccountsPage, HistoryPage, UnknownPage
|
||||||
|
|
||||||
__all__ = ['BNPEnterprise']
|
__all__ = ['BNPEnterprise']
|
||||||
|
|
||||||
|
|
||||||
class BNPEnterprise(BaseBrowser):
|
class BNPEnterprise(Browser):
|
||||||
DOMAIN = 'entreprises.bnpparibas.net'
|
DOMAIN = 'entreprises.bnpparibas.net'
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
CERTHASH = '6789f1e08e18d6578dca88ce2e0354a99dbe7824736c01c9c4fa3b456d03b9e9'
|
CERTHASH = '6789f1e08e18d6578dca88ce2e0354a99dbe7824736c01c9c4fa3b456d03b9e9'
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import Browser, BrowserIncorrectPassword
|
||||||
|
|
||||||
from .pages import LoginPage, AccountsList, AccountHistory, CardHistory, UpdateInfoPage, AuthenticationPage
|
from .pages import LoginPage, AccountsList, AccountHistory, CardHistory, UpdateInfoPage, AuthenticationPage
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ class BrowserIncorrectAuthenticationCode(BrowserIncorrectPassword):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Boursorama(BaseBrowser):
|
class Boursorama(Browser):
|
||||||
DOMAIN = 'www.boursorama.com'
|
DOMAIN = 'www.boursorama.com'
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
CERTHASH = ['6bdf8b6dd177bd417ddcb1cfb818ede153288e44115eb269f2ddd458c8461039', 'b290ef629c88f0508e9cc6305421c173bd4291175e3ddedbee05ee666b34c20e']
|
CERTHASH = ['6bdf8b6dd177bd417ddcb1cfb818ede153288e44115eb269f2ddd458c8461039', 'b290ef629c88f0508e9cc6305421c173bd4291175e3ddedbee05ee666b34c20e']
|
||||||
|
|
@ -51,7 +51,7 @@ class Boursorama(BaseBrowser):
|
||||||
*args, **kwargs):
|
*args, **kwargs):
|
||||||
self.device = device
|
self.device = device
|
||||||
self.enable_twofactors = enable_twofactors
|
self.enable_twofactors = enable_twofactors
|
||||||
BaseBrowser.__init__(self, *args, **kwargs)
|
Browser.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
def home(self):
|
def home(self):
|
||||||
if not self.is_logged():
|
if not self.is_logged():
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue