This commit is contained in:
12
bibcheck.py
12
bibcheck.py
@@ -10,13 +10,19 @@ pushover.init('a5uja274ec5h46paanzjqy5zo1ym6y')
|
||||
|
||||
def main():
|
||||
requests.get("https://health.d1v3.de/ping/5185e698-ea0b-44e0-857e-8f52487dca5d/start")
|
||||
allinfo = []
|
||||
allinfo += check('40008532980', '4F3sf7KfQC')
|
||||
allinfo += check('400006306065', '54zjxTHvIY')
|
||||
requests.post("https://health.d1v3.de/ping/5185e698-ea0b-44e0-857e-8f52487dca5d", data='\n'.join(allinfo).encode('utf8'))
|
||||
|
||||
def check(username, password):
|
||||
br = mechanize.Browser()
|
||||
starturl = 'https://ssl.muenchen.de/aDISWeb/app?service=direct/0/Home/$DirectLink&sp=SOPAC'
|
||||
response = br.open(starturl)
|
||||
br.follow_link(text_regex=r"Anmelden")
|
||||
br.select_form('Form0')
|
||||
br['$Textfield'] = '400006306065'
|
||||
br['$Textfield$0'] = '54zjxTHvIY'
|
||||
br['$Textfield'] = username
|
||||
br['$Textfield$0'] = password
|
||||
response = br.submit()
|
||||
br.follow_link(text_regex=r"Konto")
|
||||
response = br.follow_link(text_regex=r"Ausleihe zeigen")
|
||||
@@ -33,7 +39,7 @@ def main():
|
||||
|
||||
if delta.days <= 10 or delta.days == 20 or delta.days == 15:
|
||||
pushover.Client('u5w9h8gc7hpzvr5a2kh2xh4m9zpidq').send_message('Bitte an {} denken, Abgabe {}'.format(info[3], info[1]), title="Erinnerung")
|
||||
requests.post("https://health.d1v3.de/ping/5185e698-ea0b-44e0-857e-8f52487dca5d", data='\n'.join(allinfo).encode('utf8'))
|
||||
return allinfo
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user