Orange: adapt to website changes (closes #1828)

* the login page moved to a new address, over HTTPS
* the password field is now named 'password'
This commit is contained in:
Lucas Nussbaum 2015-04-02 10:59:26 +02:00 committed by Romain Bignon
commit ffe79d1b6b
2 changed files with 4 additions and 4 deletions

View file

@ -32,8 +32,8 @@ __all__ = ['OrangeBrowser']
class OrangeBrowser(Browser):
DOMAIN = 'orange.fr'
PAGES = {
'http://id.orange.fr/auth_user/bin/auth_user.cgi.*': LoginPage,
'http://id.orange.fr/auth_user/bin/auth0user.cgi.*': LoginPage,
'https://authweb.orange.fr/auth_user/bin/auth_user.cgi.*': LoginPage,
'https://authweb.orange.fr/auth_user/bin/auth0user.cgi.*': LoginPage,
'http://smsmms1.orange.fr/./Sms/sms_write.php.*' : ComposePage,
'http://smsmms1.orange.fr/./Sms/sms_write.php?command=send' : ConfirmPage,
}
@ -51,7 +51,7 @@ class OrangeBrowser(Browser):
def login(self):
if not self.is_on_page(LoginPage):
self.location('http://id.orange.fr/auth_user/bin/auth_user.cgi?url=http://www.orange.fr', no_login=True)
self.location('https://authweb.orange.fr/auth_user/bin/auth_user.cgi?url=http://www.orange.fr', no_login=True)
self.page.login(self.username, self.password)
if not self.is_logged():
raise BrowserIncorrectPassword()

View file

@ -27,7 +27,7 @@ class LoginPage(Page):
def login(self, user, pwd):
post_data = {"credential" : str(user),
"pwd" : str(pwd),
"password" : str(pwd),
"save_user": "false",
"save_pwd" : "false",
"save_TC" : "true",