Untitled

mail@pastecode.io avatar
unknown
python
3 years ago
591 B
1
Indexable
Never
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)