(Jan-10-2020, 03:25 AM)buran Wrote: You don't pass datain the requestI guess he forget and have tried that.
It will not work the way you have it now.
Most change header data
content-type
from the default text/html
to text/plain
.import requests headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0', 'Accept': '*/*', 'Accept-Language': 'en-US,en;q=0.5', 'Content-Type': 'text/plain;charset=UTF-8', 'Connection': 'keep-alive', } data = '{"queries":[{"fields":["title","topic"],"query":"Livestream"},{"fields":["channel"],"query":"ndr"}]}' response = requests.post('https://mediathekviewweb.de/api/query', headers=headers, data=data) response_json = response.json() print(response_json['result']['results'][0]['url_video'])
Output:http://ndrfs-lh.akamaihd.net/i/ndrfs_nds@430233/master.m3u8