Unfinished commit
This commit is contained in:
parent
9d6d544e0a
commit
92ab017689
|
@ -3,7 +3,7 @@
|
|||
import urllib.request, json
|
||||
import MySQLdb
|
||||
import MySQLdb.cursors
|
||||
import time, calendar
|
||||
import time, calendar, string
|
||||
import atexit
|
||||
|
||||
with open("config.json", "r") as f:
|
||||
|
@ -23,9 +23,71 @@ def on_close():
|
|||
|
||||
atexit.register(on_close)
|
||||
|
||||
URL = "https://osu.ppy.sh/web/get-internal-version.php?v={}"
|
||||
VERSIONS = urllib.request.urlopen(URL.format("_")) # Gets all versions
|
||||
#---------------------------------------
|
||||
|
||||
BEGINNING = memory["version_scrape"]["last"]
|
||||
for i in range(VERSIONS):
|
||||
pass #Unfinished
|
||||
VERSIONS = check("_") # Gets all versions
|
||||
BRANCH = {
|
||||
"_": VERSIONS
|
||||
}
|
||||
SCAN = string.printable[:62] + "-+.:,"
|
||||
|
||||
def check(s):
|
||||
return urllib.request.urlopen("https://osu.ppy.sh/web/get-internal-version.php?v={}".format(s)).read().decode()
|
||||
|
||||
"""
|
||||
TMP = ""
|
||||
def scope(v):
|
||||
global TMP
|
||||
TMP = ""
|
||||
o_key = ""
|
||||
o_value = v["_"]
|
||||
v = _scope(v)
|
||||
print(v)
|
||||
print(TMP)
|
||||
print(o_key)
|
||||
print(o_value)
|
||||
|
||||
def _scope(v):
|
||||
global TMP
|
||||
for key, value in v.items():
|
||||
if type(value) is int:
|
||||
if len(v) is 1:
|
||||
return key
|
||||
continue
|
||||
TMP += key
|
||||
return _scope(v[key])
|
||||
|
||||
|
||||
return {o_key: o_value}
|
||||
|
||||
OUT = ""
|
||||
ENTRIES = v["_"]
|
||||
for key, value in v.items():
|
||||
if key is "_":
|
||||
continue
|
||||
elif type(value) is int:
|
||||
return key
|
||||
else:
|
||||
S = scope(v[key])
|
||||
OUT += key + S.keys()[0]
|
||||
ENTRIES = S.values()[0]
|
||||
return {OUT: ENTRIES}
|
||||
"""
|
||||
|
||||
char_index = 0
|
||||
current_string = "_"
|
||||
while memory["version_scrape"]["last"] < VERSIONS:
|
||||
|
||||
|
||||
"""
|
||||
|
||||
s = scope(BRANCH)
|
||||
if s.endswith("_"): # Branch into?
|
||||
entries = BRANCH[s]
|
||||
if entries is 0:
|
||||
|
||||
continue # Meh... we are at the end
|
||||
else:
|
||||
"""
|
||||
|
||||
#r = check()
|
Loading…
Reference in New Issue
Block a user