Commit d5a29f6b authored by Louise Zanier's avatar Louise Zanier Committed by hydrargyrum
Browse files

[bouygues] Raise ScrapingBlocked exception

parent b926205d
......@@ -24,7 +24,7 @@
from woob.browser import LoginBrowser, URL, need_login
from woob.browser.exceptions import HTTPNotFound, ClientError
from woob.exceptions import BrowserIncorrectPassword
from woob.exceptions import BrowserIncorrectPassword, ScrapingBlocked
from import urlparse, parse_qsl
from .pages import (
......@@ -69,7 +69,12 @@ def __init__(self, username, password, lastname, *args, **kwargs):
self.headers = None
def do_login(self):
except ClientError as e:
if e.response.status_code == 407:
raise ScrapingBlocked()
try:, self.password, self.lastname)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment