mirror of
https://github.com/FliegendeWurst/googleplay-api.git
synced 2024-11-22 12:54:58 +00:00
A more detailed test.py
Signed-off-by: Domenico Iezzi <domenico.iezzi.201@gmail.com>
This commit is contained in:
parent
8d39d03304
commit
2a8ec84fc7
38
test.py
38
test.py
@ -2,24 +2,28 @@ from googleplay import GooglePlayAPI
|
||||
|
||||
EMAIL = ""
|
||||
PASSWD = ""
|
||||
AC2DM = ""
|
||||
GSFID = 0
|
||||
|
||||
testApps = ['com.cpuid.cpu_z']
|
||||
server = GooglePlayAPI(True)
|
||||
if AC2DM == "":
|
||||
server.login(EMAIL, PASSWD, None, None)
|
||||
print(server.search('firefox', 1, None).child[0])
|
||||
print(server.bulkDetails(['com.mozilla.firefox']))
|
||||
fl = server.download('com.cpuid.cpu_z', 23)
|
||||
with open('com.cpuid.cpu_z.apk', 'wb') as f:
|
||||
f.write(fl)
|
||||
f.close()
|
||||
else:
|
||||
server.gsfId = GSFID
|
||||
server.login(EMAIL, PASSWD, AC2DM, GSFID)
|
||||
print(server.search('firefox', 1, None).child[0])
|
||||
print(server.bulkDetails(['com.mozilla.firefox']))
|
||||
fl = server.download('com.cpuid.cpu_z', 23)
|
||||
with open('com.cpuid.cpu_z.apk', 'wb') as f:
|
||||
|
||||
print('\nLogging in with email and password\n')
|
||||
server.login(EMAIL, PASSWD, None, None)
|
||||
ac2dmToken = server.ac2dmToken
|
||||
gsfId = server.gsfId
|
||||
|
||||
print('\nNow trying secondary login with ac2dm token and gsfId saved\n')
|
||||
server.login(EMAIL, PASSWD, ac2dmToken, gsfId)
|
||||
|
||||
app = server.search('telegram', 1, None).child[0]
|
||||
docid = app.docid
|
||||
version = app.details.appDetails.versionCode
|
||||
print('\nFirefox docid is: %s\n' % docid)
|
||||
print('\nAttempting to download %s\n' % docid)
|
||||
fl = server.download(docid, version)
|
||||
with open(docid + '.apk', 'wb') as f:
|
||||
f.write(fl)
|
||||
print('\nDownload successful\n')
|
||||
f.close()
|
||||
print('\nGetting details for %s\n' % testApps[0])
|
||||
bulk = server.bulkDetails(testApps)
|
||||
print(bulk)
|
||||
|
Loading…
Reference in New Issue
Block a user