Jan-09-2020, 08:37 PM
I make a query api via html.
I would like to do it with python.
HTML:
Result:
I would like to do it with python.
HTML:
Result:
Output:URL
http://ndrfs-lh.akamaihd.net/i/ndrfs_nds@430233/master.m3u8
My attempt with pythonimport json import requests url = 'https://mediathekviewweb.de/api/query' headers = {'Content-Type': 'application/json'} data = ("""{ queries:[ { fields:[ 'title', 'topic' ], query:'Livestream' }, { fields:[ 'channel' ], query:'ndr' } ] }; """) response = requests.post(url, headers=headers) if response.status_code == 200: print(json.loads(response.content.decode('utf-8'))) else: print(response.status_code, response.text)The Error Message:
Output:400 {"result":null,"err":["Unexpected token o in JSON at position 1"]}