Skip to content

Instantly share code, notes, and snippets.

@thurask
Last active January 30, 2019 08:34
Show Gist options
  • Save thurask/be2b438ed25936528cdc250c5963963a to your computer and use it in GitHub Desktop.
Save thurask/be2b438ed25936528cdc250c5963963a to your computer and use it in GitHub Desktop.
import os
import json
import requests
if not os.path.exists("apps.json"):
jarray = {}
else:
with open("apps.json") as afile:
jarray = json.load(afile)
for x in range(4000):
appurl = "https://aota.tclclouds.com/api/app/appDetail/{0}/en".format(str(x))
if str(x) not in jarray:
print("NOW SCANNING ID: {0}".format(str(x)), end="\r")
req = requests.get(appurl)
if req.content:
rjson = req.json()
print("ID: {0} PACKAGE: {1} VERSION: {2} URL: {3}".format(rjson["id"], rjson["apkPackName"], rjson["versionName"], rjson["appUrl"]))
jarray[rjson["id"]] = {"apkPackName": rjson["apkPackName"], "versionName": rjson["versionName"], "appUrl": rjson["appUrl"]}
with open("apps.json", "w") as afile:
json.dump(jarray, afile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment