minimal example

This commit is contained in:
notplants 2024-01-21 11:26:33 -06:00
parent 5d18be471c
commit 483c2bef68
2 changed files with 18 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea

17
main.py Normal file
View File

@ -0,0 +1,17 @@
import requests
def fetch_list(list_url, page):
headers = {"accept": "application/ld+json"}
url = list_url + "?page={}".format(page)
result = requests.get(url, headers=headers)
return result
if __name__ == '__main__':
list_url = "https://wyrms.de/user/j12i/books/reading"
list = fetch_list(list_url, page=1)
list_dict = list.json()
for key, val in list_dict.items():
print("{}: {}".format(key, val))