Files
Twitch-Drops-Miner/TwitchChannelPointsMiner/constants.py
2022-10-31 19:03:44 +03:00

183 lines
6.1 KiB
Python

# Twitch endpoints
URL = "https://www.twitch.tv"
IRC = "irc.chat.twitch.tv"
IRC_PORT = 6667
WEBSOCKET = "wss://pubsub-edge.twitch.tv/v1"
#CLIENT_ID = "kimne78kx3ncx6brgo4mv6wki5h1ko" # Browser
CLIENT_ID = "kd1unb4b3q4t58fwlpcbzcbnm76a8fp" # Android App
#CLIENT_ID = "851cqzxpb9bqu9z6galo155du" # iOS App
DROP_ID = "c2542d6d-cd10-4532-919b-3d19f30a768b"
CLIENT_VERSION = "32d439b2-bd5b-4e35-b82a-fae10b04da70"
USER_AGENTS = {
"Windows": {
#"CHROME": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36",
'CHROME': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36",
"FIREFOX": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0",
},
"Linux": {
"CHROME": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36",
"FIREFOX": "Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0",
},
}
BRANCH = "master"
GITHUB_url = (
"https://raw.githubusercontent.com/rdavydov/Twitch-Channel-Points-Miner-v2/"
+ BRANCH
)
class GQLOperations:
url = "https://gql.twitch.tv/gql"
integrity_url = "https://gql.twitch.tv/integrity"
WithIsStreamLiveQuery = {
"operationName": "WithIsStreamLiveQuery",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "04e46329a6786ff3a81c01c50bfa5d725902507a0deb83b0edbf7abe7a3716ea",
}
},
}
VideoPlayerStreamInfoOverlayChannel = {
"operationName": "VideoPlayerStreamInfoOverlayChannel",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "a5f2e34d626a9f4f5c0204f910bab2194948a9502089be558bb6e779a9e1b3d2",
}
},
}
ClaimCommunityPoints = {
"operationName": "ClaimCommunityPoints",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "46aaeebe02c99afdf4fc97c7c0cba964124bf6b0af229395f1f6d1feed05b3d0",
}
},
}
DropsPage_ClaimDropRewards = {
"operationName": "DropsPage_ClaimDropRewards",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "2f884fa187b8fadb2a49db0adc033e636f7b6aaee6e76de1e2bba9a7baf0daf6",
}
},
}
ChannelPointsContext = {
"operationName": "ChannelPointsContext",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "9988086babc615a918a1e9a722ff41d98847acac822645209ac7379eecb27152",
}
},
}
JoinRaid = {
"operationName": "JoinRaid",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "c6a332a86d1087fbbb1a8623aa01bd1313d2386e7c63be60fdb2d1901f01a4ae",
}
},
}
ModViewChannelQuery = {
"operationName": "ModViewChannelQuery",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "df5d55b6401389afb12d3017c9b2cf1237164220c8ef4ed754eae8188068a807",
}
},
}
Inventory = {
"operationName": "Inventory",
"variables": {},
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "e0765ebaa8e8eeb4043cc6dfeab3eac7f682ef5f724b81367e6e55c7aef2be4c",
}
},
}
MakePrediction = {
"operationName": "MakePrediction",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "b44682ecc88358817009f20e69d75081b1e58825bb40aa53d5dbadcc17c881d8",
}
},
}
ViewerDropsDashboard = {
"operationName": "ViewerDropsDashboard",
"variables": {},
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "c4d61d7b71d03b324914d3cf8ca0bc23fe25dacf54120cc954321b9704a3f4e2",
}
},
}
DropCampaignDetails = {
"operationName": "DropCampaignDetails",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "14b5e8a50777165cfc3971e1d93b4758613fe1c817d5542c398dce70b7a45c05",
}
},
}
DropsHighlightService_AvailableDrops = {
"operationName": "DropsHighlightService_AvailableDrops",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "b19ee96a0e79e3f8281c4108bc4c7b3f232266db6f96fd04a339ab393673a075",
}
},
}
ReportMenuItem = { # Use for replace https://api.twitch.tv/helix/users?login={self.username}
"operationName": "ReportMenuItem",
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "8f3628981255345ca5e5453dfd844efffb01d6413a9931498836e6268692a30c",
}
},
}
PersonalSections = (
{
"operationName": "PersonalSections",
"variables": {
"input": {
"sectionInputs": ["FOLLOWED_SECTION"],
"recommendationContext": {"platform": "web"},
},
"channelLogin": None,
"withChannelUser": False,
"creatorAnniversariesExperimentEnabled": False,
},
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "9fbdfb00156f754c26bde81eb47436dee146655c92682328457037da1a48ed39",
}
},
},
)
ChannelFollows = {
"operationName": "ChannelFollows",
"variables": {"limit": 100, "order": "ASC"},
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "4b9cb31b54b9213e5760f2f6e9e935ad09924cac2f78aac51f8a64d85f028ed0",
}
},
}