mirror of
https://github.com/ihabunek/twitch-dl
synced 2024-08-30 18:32:25 +00:00
Remove old kraken requests
This commit is contained in:
parent
9c3cf11635
commit
caabe3138c
@ -42,15 +42,6 @@ def authenticated_post(url, data=None, json=None, headers={}):
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
def kraken_get(url, params={}, headers={}):
|
|
||||||
"""
|
|
||||||
Add accept header required by kraken API v5.
|
|
||||||
see: https://discuss.dev.twitch.tv/t/change-in-access-to-deprecated-kraken-twitch-apis/22241
|
|
||||||
"""
|
|
||||||
headers["Accept"] = "application/vnd.twitchtv.v5+json"
|
|
||||||
return authenticated_get(url, params, headers)
|
|
||||||
|
|
||||||
|
|
||||||
def gql_post(query):
|
def gql_post(query):
|
||||||
url = "https://gql.twitch.tv/gql"
|
url = "https://gql.twitch.tv/gql"
|
||||||
response = authenticated_post(url, data=query).json()
|
response = authenticated_post(url, data=query).json()
|
||||||
@ -71,15 +62,6 @@ def gql_query(query):
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
def get_video_legacy(video_id):
|
|
||||||
"""
|
|
||||||
https://dev.twitch.tv/docs/v5/reference/videos#get-video
|
|
||||||
"""
|
|
||||||
url = "https://api.twitch.tv/kraken/videos/{}".format(video_id)
|
|
||||||
|
|
||||||
return kraken_get(url).json()
|
|
||||||
|
|
||||||
|
|
||||||
VIDEO_FIELDS = """
|
VIDEO_FIELDS = """
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
|
Loading…
Reference in New Issue
Block a user