forked from Fragrance/eaquira
format code
This commit is contained in:
parent
d9123943f6
commit
2f8d9d6713
@ -2,13 +2,10 @@ import json
|
||||
import pytz
|
||||
|
||||
from sdgb import sdgb_api
|
||||
from sdgb import aimedb_api
|
||||
from datetime import datetime
|
||||
|
||||
from settings import userId, accessCode
|
||||
from settings import regionId
|
||||
from settings import clientId
|
||||
from settings import placeId
|
||||
from settings import regionId, clientId, placeId
|
||||
|
||||
def login(timestamp):
|
||||
data = json.dumps({
|
||||
@ -22,9 +19,8 @@ def login(timestamp):
|
||||
"genericFlag": 0,
|
||||
})
|
||||
|
||||
login_result = json.loads(sdgb_api(data, "UserLoginApi", userId))
|
||||
login_result = sdgb_api(data, "UserLoginApi", userId)
|
||||
return login_result
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(aimedb_api(accessCode))
|
||||
print(login(int(input())))
|
||||
|
@ -5,9 +5,7 @@ from sdgb import sdgb_api
|
||||
from datetime import datetime
|
||||
|
||||
from settings import userId, accessCode
|
||||
from settings import regionId
|
||||
from settings import clientId
|
||||
from settings import placeId
|
||||
from settings import regionId, clientId, placeId
|
||||
|
||||
def logout(timestamp):
|
||||
data = json.dumps({
|
||||
@ -20,7 +18,7 @@ def logout(timestamp):
|
||||
"type": 1
|
||||
})
|
||||
|
||||
logout_result = json.loads(sdgb_api(data, "UserLogoutApi", userId))
|
||||
logout_result = sdgb_api(data, "UserLogoutApi", userId)
|
||||
return logout_result
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import json
|
||||
|
||||
from sdgb import sdgb_api
|
||||
from sdgb import aimedb_api
|
||||
from settings import userId, accessCode
|
||||
|
||||
def preview(userId):
|
||||
@ -14,5 +13,4 @@ def preview(userId):
|
||||
return preview_result
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(aimedb_api(accessCode))
|
||||
print(preview(userId))
|
||||
|
@ -5,9 +5,7 @@ from sdgb import sdgb_api
|
||||
from datetime import datetime
|
||||
|
||||
from settings import userId
|
||||
from settings import regionId
|
||||
from settings import clientId
|
||||
from settings import placeId
|
||||
from settings import regionId, clientId, placeId
|
||||
|
||||
def login(timestamp):
|
||||
data = json.dumps({
|
||||
@ -21,7 +19,7 @@ def login(timestamp):
|
||||
"genericFlag": 0,
|
||||
})
|
||||
|
||||
login_result = json.loads(sdgb_api(data, "UserLoginApi", userId))
|
||||
login_result = sdgb_api(data, "UserLoginApi", userId)
|
||||
return login_result
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -5,9 +5,7 @@ from sdgb import sdgb_api
|
||||
from datetime import datetime
|
||||
|
||||
from settings import userId
|
||||
from settings import regionId
|
||||
from settings import clientId
|
||||
from settings import placeId
|
||||
from settings import regionId, clientId, placeId
|
||||
|
||||
def logout(timestamp):
|
||||
data = json.dumps({
|
||||
@ -20,7 +18,7 @@ def logout(timestamp):
|
||||
"type": 1
|
||||
})
|
||||
|
||||
logout_result = json.loads(sdgb_api(data, "UserLogoutApi", userId))
|
||||
logout_result = sdgb_api(data, "UserLogoutApi", userId)
|
||||
return logout_result
|
||||
|
||||
|
||||
|
@ -8,11 +8,7 @@ from datetime import datetime, timedelta
|
||||
|
||||
from settings import userId
|
||||
from settings import music_data
|
||||
from settings import regionId
|
||||
from settings import regionName
|
||||
from settings import clientId
|
||||
from settings import placeId
|
||||
from settings import placeName
|
||||
from settings import regionId, clientId, placeId, regionName, placeName
|
||||
|
||||
from login import login
|
||||
from logout import logout
|
||||
@ -50,7 +46,7 @@ def music():
|
||||
|
||||
# UserLogin
|
||||
|
||||
login_result = login(timestamp)
|
||||
login_result = json.loads(login(timestamp))
|
||||
print(login_result)
|
||||
|
||||
login_id = login_result['loginId']
|
||||
|
@ -8,11 +8,7 @@ from datetime import datetime, timedelta
|
||||
|
||||
from settings import userId
|
||||
from settings import music_data
|
||||
from settings import regionId
|
||||
from settings import regionName
|
||||
from settings import clientId
|
||||
from settings import placeId
|
||||
from settings import placeName
|
||||
from settings import regionId, clientId, placeId, regionName, placeName
|
||||
|
||||
from login import login
|
||||
from logout import logout
|
||||
@ -50,7 +46,7 @@ def music():
|
||||
|
||||
# UserLogin
|
||||
|
||||
login_result = login(timestamp)
|
||||
login_result = json.loads(login(timestamp))
|
||||
print(login_result)
|
||||
|
||||
login_id = login_result['loginId']
|
||||
|
@ -6,9 +6,7 @@ from sdgb import sdgb_api
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from settings import userId
|
||||
from settings import regionId
|
||||
from settings import clientId
|
||||
from settings import placeId
|
||||
from settings import regionId, clientId, placeId
|
||||
|
||||
from logout import logout
|
||||
from login import login
|
||||
@ -32,7 +30,7 @@ def get_ticket():
|
||||
}
|
||||
})
|
||||
|
||||
ticket_result = json.loads(sdgb_api(data, "UpsertUserChargelogApi", userId))
|
||||
ticket_result = sdgb_api(data, "UpsertUserChargelogApi", userId)
|
||||
|
||||
return ticket_result
|
||||
|
||||
|
@ -8,11 +8,7 @@ from datetime import datetime, timedelta
|
||||
|
||||
from settings import userId
|
||||
from settings import music_data
|
||||
from settings import regionId
|
||||
from settings import regionName
|
||||
from settings import clientId
|
||||
from settings import placeId
|
||||
from settings import placeName
|
||||
from settings import regionId, clientId, placeId, regionName, placeName
|
||||
|
||||
from login import login
|
||||
from logout import logout
|
||||
@ -50,7 +46,7 @@ def music(unlock_id):
|
||||
|
||||
# UserLogin
|
||||
|
||||
login_result = login(timestamp)
|
||||
login_result = json.loads(login(timestamp))
|
||||
print(login_result)
|
||||
|
||||
login_id = login_result['loginId']
|
||||
@ -388,7 +384,7 @@ def music(unlock_id):
|
||||
"isNewMapList": "",
|
||||
"isNewLoginBonusList": "",
|
||||
"isNewItemList": 11,
|
||||
"isNewMusicDetailList": "0",
|
||||
"isNewMusicDetailList": "1",
|
||||
"isNewCourseList": "0",
|
||||
"isNewFavoriteList": "",
|
||||
"isNewFriendSeasonRankingList": ""
|
||||
|
@ -8,11 +8,7 @@ from datetime import datetime, timedelta
|
||||
|
||||
from settings import userId
|
||||
from settings import music_data
|
||||
from settings import regionId
|
||||
from settings import regionName
|
||||
from settings import clientId
|
||||
from settings import placeId
|
||||
from settings import placeName
|
||||
from settings import regionId, clientId, placeId, regionName, placeName
|
||||
|
||||
from login import login
|
||||
from logout import logout
|
||||
@ -50,7 +46,7 @@ def music():
|
||||
|
||||
# UserLogin
|
||||
|
||||
login_result = login(timestamp)
|
||||
login_result = json.loads(login(timestamp))
|
||||
print(login_result)
|
||||
|
||||
login_id = login_result['loginId']
|
||||
|
Loading…
x
Reference in New Issue
Block a user