comment out assertions in ENV page html
authorgregor herrmann <gregoa@debian.org>
Fri, 7 Apr 2017 18:10:51 +0000 (20:10 +0200)
committergregor herrmann <gregoa@debian.org>
Fri, 7 Apr 2017 18:10:51 +0000 (20:10 +0200)
this javascript seems to be gone.
leave the reload.
unfotunately this is altogether not very stable; sometimes the "content" of
the page seems to be missing ...

bob_download.py

index 170d2cb4efc41bc1267d44d052b43cb579e1c625..be8914a7217cf060ddc9506118bd0a700c6637f9 100755 (executable)
@@ -86,10 +86,12 @@ def main(username, password, destdir, csv_format):
         url = link['href']
         response = session.get(urljoin(response.url, url))
         assert response.ok
-        assert 'OBP.utils.reloadAfterDelay("/bill.ctn.cdr.set.obp",5);' in response.text
-        time.sleep(5) # OBP.utils.reloadAfterDelay("/bill.ctn.cdr.set.obp",5);
-        response = session.get(urljoin(response.url, 'bill.ctn.cdr.set.obp'))
-        assert 'OBP.utils.reloadAfterDelay("/bill.ctn.cdr.set.obp",5);' not in response.text
+#        assert 'OBP.utils.reloadAfterDelay("/bill.ctn.cdr.set.obp",5);' in response.text
+#        time.sleep(5) # OBP.utils.reloadAfterDelay("/bill.ctn.cdr.set.obp",5);
+#        response = session.get(urljoin(response.url, 'bill.ctn.cdr.set.obp'))
+#        assert 'OBP.utils.reloadAfterDelay("/bill.ctn.cdr.set.obp",5);' not in response.text
+        time.sleep(5)
+        response = session.get(response.url)
         html = BeautifulSoup(response.text, 'html.parser')
         assert html.find('a', id='link_csv_download') is not None
         response = session.get('https://rechnung.bob.at/obp/download.obp?fmt={}&table=obp.calls.table'.format(csv_format))