14 lines
553 B
Python
14 lines
553 B
Python
import urllib.request
|
|
import urllib.parse
|
|
import json
|
|
|
|
book = "Hohlbein Hennen - DSA - Das Jahr des Greifen 03 - Die Amazone"
|
|
url = f"http://127.0.0.1:8010/api/line-audio/{urllib.parse.quote(book)}/check"
|
|
data = json.dumps({"keys": ["c79dbe84b9ed7b1780891ba905951bb6", "ee3559287060ae3530fb9d7f088ff9c8"]}).encode('utf-8')
|
|
req = urllib.request.Request(url, data=data, headers={'Content-Type': 'application/json'}, method='POST')
|
|
try:
|
|
with urllib.request.urlopen(req) as f:
|
|
print(f.read().decode('utf-8'))
|
|
except Exception as e:
|
|
print(e)
|