Moving bill upload url into creds.yml

This commit is contained in:
Kirby 2020-03-12 17:50:31 +01:00
parent b8f206ee32
commit f3c3fd231c

View File

@ -16,7 +16,7 @@ password = conf['nextcloud']['password']
client = ovh.Client()
bills = client.get('/me/bill')
for bill in bills:
url="https://nextcloud.hyrule.ovh/nextcloud/remote.php/dav/files/seb/Documents/Factures/OVH/"
url = conf['nextcloud']['url_factures']
details = client.get('/me/bill/%s' % bill)
r = requests.get(details['pdfUrl'], stream=True)
file_path = "/tmp/" + bill + ".pdf"