diff --git a/modules/pajemploi/browser.py b/modules/pajemploi/browser.py index de99cb560ef4f01aa08457586a27d62309e5737d..fcad6bbf743fb222cfb28d6dbd219d713defddb4 100644 --- a/modules/pajemploi/browser.py +++ b/modules/pajemploi/browser.py @@ -126,4 +126,7 @@ def download_document(self, document): and document._need_refresh_previous_page ): document._previous_page.go(data=document._previous_data) - return self.open(document.url).content + data = {} + if hasattr(document, '_ref'): + data["ref"] = document._ref + return self.open(document.url, data=data).content diff --git a/modules/pajemploi/pages.py b/modules/pajemploi/pages.py index 8cf6df3f6a945d583fd4355ab6d821fb6ede994d..8c197571175822727fb435652709c274284de097 100644 --- a/modules/pajemploi/pages.py +++ b/modules/pajemploi/pages.py @@ -41,7 +41,7 @@ Field, Eval, ) -from weboob.browser.filters.html import Attr, Link, TableCell +from weboob.browser.filters.html import Attr, Link, TableCell, FormValue from weboob.tools.date import parse_french_date @@ -280,6 +280,7 @@ def iter_documents(self, proto_doc, subscription): bs.type = DocumentTypes.OTHER bs.label = "Bulletin de salaire %s %s" % (subscription.label, date.strftime("%d/%m/%Y")) bs.url = Attr(".", "action")(frm[0]) + bs._ref = FormValue('./input[@id="ref"]')(frm[0]) yield bs # Relevé mensuel