Reload time is now 5 seconds as in the original javascript.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 1 Oct 2015 20:32:15 +0000 (22:32 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 1 Oct 2015 20:32:15 +0000 (22:32 +0200)
bob_download.py

index c35524a702d2c7c71bcd880503b4f67f54d11bbc..2b1a272982341248ec8c3d788a3a21c01962831a 100644 (file)
@@ -1,6 +1,7 @@
 #!/usr/bin/python3
 import os
 import re
+import time
 import requests
 from bs4 import BeautifulSoup
 
@@ -59,10 +60,10 @@ for link in links:
     url = link['href']
     response = session.get(main_url[:-1] + url)
     assert response.status_code == 200
-    assert response.text != ''
-    import time
-    time.sleep(3)
+    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(main_url + 'bill.ctn.cdr.set.obp')
+    assert 'OBP.utils.reloadAfterDelay("/bill.ctn.cdr.set.obp",5);' not in response.text
     html = BeautifulSoup(response.text, 'html.parser')
     assert html.find('a', id='link_csv_download') is not None
     response = session.get('https://rechnung.bob.at/download.table.obp?fmt=TAB&table=obp.calls.table', headers=additional_headers)