Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
Changed how dynamic url is being generated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Loukious committed May 4, 2024
1 parent 1551419 commit 708a5f3
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions TiktokStreamKeyGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,22 @@ def endStream(self):
)
return False
return True

def getServerUrl(self):
url = "https://tnc16-platform-useast1a.tiktokv.com/get_domains/v4/?aid=8311&ttwebview_version=1130022000"
response = self.s.get(url)
return f"https://webcast16-normal-c-{response.url.split('/')[2].split('-')[2]}/"
url = (
"https://tnc16-platform-useast1a.tiktokv.com/get_domains/v4/?"
"aid=8311&ttwebview_version=1130022001"
)
response = self.s.get(url).json()
for data in response["data"]["ttnet_dispatch_actions"]:
if "param" in data and "strategy_info" in data["param"] and \
"webcast-normal.tiktokv.com" in \
data["param"]["strategy_info"]:
server_url = data['param']['strategy_info'][
'webcast-normal.tiktokv.com'
]
return f"https://{server_url}/"


def save_config():
"""Save entry values to a JSON file."""
Expand Down

0 comments on commit 708a5f3

Please sign in to comment.