From a013f6c4c6801805dbe6ecad45588c2a0ab9d3e5 Mon Sep 17 00:00:00 2001 From: Georg Sauthoff Date: Mon, 26 Sep 2016 16:02:01 +0200 Subject: [PATCH] Store pdf in result, also store manifest - since multiple vouchers yield one PDF, storing it directly in the result object makes more sense - the manifest is also available when buying PDFs, thus retrieve it as well --- inema/inema.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inema/inema.py b/inema/inema.py index 62167c6..20980a2 100644 --- a/inema/inema.py +++ b/inema/inema.py @@ -128,7 +128,9 @@ class Internetmarke(object): _logger.info("PDF checkout result: %s", r) if r.link: pdf = requests.get(r.link, stream=True) - r.shoppingCart.voucherList.voucher[0].pdf_bin = pdf.content + r.pdf_bin = pdf.content + if r.manifestLink: + r.manifest_pdf_bin = self.retrieve_manifest(r.manifestLink) return r def checkoutPNG(self):