Untitled

 avatar
unknown
python
4 years ago
591 B
2
Indexable
import requests
import json

url = "https://gql.twitch.tv/gql"

payload="{\"query\":\"query {featuredStreams(language: \\\"pl\\\", first: 8) {\\r\\n        description\\r\\n        stream {\\r\\n            broadcaster {\\r\\n                displayName\\r\\n                id\\r\\n                login\\r\\n            }\\r\\n        }\\r\\n    }\\r\\n    }\",\"variables\":{}}"
headers = {
  'client-id': 'kimne78kx3ncx6brgo4mv6wki5h1ko',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
Editor is loading...