-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.py
More file actions
16 lines (16 loc) · 753 Bytes
/
test.py
File metadata and controls
16 lines (16 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
if __name__ == '__main__':
import os
import requests
print("Hello, World!")
page_num = 10000
page_size = 100
crt="C:\\resources\\datamanager_eminfra_prd.awv.vlaanderen.be.crt"
key = "C:\\resources\\datamanager_eminfra_prd.awv.vlaanderen.be.key"
if not os.path.isfile(crt):
raise FileNotFoundError(crt + " is not a valid path. Cert file does not exist.")
if not os.path.isfile(key):
raise FileNotFoundError(key + " is not a valid path. Key file does not exist.")
url = f'https://services.apps.mow.vlaanderen.be/eminfra/feedproxy/feed/assets/{page_num}/{page_size}'
response = requests.get(url=url, cert=(crt, key))
decoded_string = response.content.decode("utf-8")
print(decoded_string)