support login on dlfp
This commit is contained in:
parent
4cde2ef3d5
commit
aae79a7e8b
3 changed files with 64 additions and 13 deletions
|
|
@ -18,8 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
"""
|
||||
|
||||
class PageBase:
|
||||
from mechanize import FormNotFoundError
|
||||
|
||||
class BasePage:
|
||||
def __init__(self, dlfp, document, url=''):
|
||||
self.dlfp = dlfp
|
||||
self.document = document
|
||||
|
|
@ -27,3 +28,11 @@ class PageBase:
|
|||
|
||||
def loaded(self):
|
||||
pass
|
||||
|
||||
def isLogged(self):
|
||||
forms = self.document.getElementsByTagName('form')
|
||||
for form in forms:
|
||||
if form.getAttribute('id') == 'formulaire':
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue