LCL Enterprise: support pagination
This commit is contained in:
parent
e4eb708cc8
commit
03beabe5a0
2 changed files with 12 additions and 2 deletions
|
|
@ -17,6 +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 urllib import urlencode
|
||||||
|
|
||||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
||||||
|
|
||||||
|
|
@ -47,6 +48,7 @@ class LCLEnterpriseBrowser(BaseBrowser):
|
||||||
PAGES_REV[LogoutOkPage]: LogoutOkPage,
|
PAGES_REV[LogoutOkPage]: LogoutOkPage,
|
||||||
PAGES_REV[MessagesPage]: MessagesPage,
|
PAGES_REV[MessagesPage]: MessagesPage,
|
||||||
PAGES_REV[MovementsPage]: MovementsPage,
|
PAGES_REV[MovementsPage]: MovementsPage,
|
||||||
|
'https://entreprises.secure.lcl.fr/outil/IQMT/mvt.Synthese/paginerReleve': MovementsPage,
|
||||||
'https://entreprises.secure.lcl.fr/': RootPage,
|
'https://entreprises.secure.lcl.fr/': RootPage,
|
||||||
'https://entreprises.secure.lcl.fr/outil/IQEN/Authentication/dejaConnecte': AlreadyConnectedPage,
|
'https://entreprises.secure.lcl.fr/outil/IQEN/Authentication/dejaConnecte': AlreadyConnectedPage,
|
||||||
'https://entreprises.secure.lcl.fr/outil/IQEN/Authentication/sessionExpiree': ExpiredPage,
|
'https://entreprises.secure.lcl.fr/outil/IQEN/Authentication/sessionExpiree': ExpiredPage,
|
||||||
|
|
@ -97,5 +99,10 @@ class LCLEnterpriseBrowser(BaseBrowser):
|
||||||
if not self.is_on_page(MovementsPage):
|
if not self.is_on_page(MovementsPage):
|
||||||
self.location(self.PAGES_REV[MovementsPage])
|
self.location(self.PAGES_REV[MovementsPage])
|
||||||
|
|
||||||
for tr in self.page.get_operations():
|
for n in range(1, self.page.nb_pages()):
|
||||||
yield tr
|
self.location('/outil/IQMT/mvt.Synthese/paginerReleve',
|
||||||
|
urlencode({'numPage': str(n)}),
|
||||||
|
no_login=True)
|
||||||
|
|
||||||
|
for tr in self.page.get_operations():
|
||||||
|
yield tr
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,9 @@ class MovementsPage(BasePage):
|
||||||
|
|
||||||
return account
|
return account
|
||||||
|
|
||||||
|
def nb_pages(self):
|
||||||
|
return int(self.document.xpath('//input[@name="nbPages"]/@value')[0])
|
||||||
|
|
||||||
def get_operations(self):
|
def get_operations(self):
|
||||||
LINE_XPATH = '//table[@id="listeEffets"]/tbody/tr'
|
LINE_XPATH = '//table[@id="listeEffets"]/tbody/tr'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue