Remove email and password from test files

Signed-off-by: Domenico Iezzi <domenico.iezzi.201@gmail.com>
This commit is contained in:
Domenico Iezzi 2017-10-17 17:58:24 +02:00
parent 6857b15d45
commit a77b362397
2 changed files with 20 additions and 14 deletions

View File

@ -1,25 +1,27 @@
from gpapi.googleplay import GooglePlayAPI, RequestError
from gpapi.googleplay import GooglePlayAPI
import sys
import argparse
EMAIL = "dodo.godlike"
PASSWD = "inpobgakicfmnhwc"
ap = argparse.ArgumentParser(description='Test download of expansion files')
ap.add_argument('-e', '--email', dest='email', help='google username')
ap.add_argument('-p', '--password', dest='password', help='google password')
args = ap.parse_args()
testApps = ['com.cpuid.cpu_z']
server = GooglePlayAPI(debug=True)
# LOGIN
print('\nLogging in with email and password\n')
server.login(EMAIL, PASSWD, None, None)
server.login(args.email, args.password, None, None)
download = server.download('com.haikugamesco.escapeasylum', 21, progress_bar=True)
download = server.download('com.mapswithme.maps.pro', 1754, progress_bar=True, expansion_files=True)
with open(download['docId'] + '.apk', 'wb') as first:
first.write(download['data'])
print('\nDownload successful\n')
for obb in download['additionalData']:
name = obb['type'] + '.' + str(obb['versionCode']) + '.' + download['docId'] + '.obb'
with open(name, 'wb') as second:
second.write(obb['data'])
print('\nDownloaded additional data\n')
print('\nDownload successful\n')

14
test.py
View File

@ -1,9 +1,13 @@
from gpapi.googleplay import GooglePlayAPI, RequestError
import sys
import argparse
EMAIL = "maracaiboez"
PASSWD = "fjgozwjmkwyvvutt"
ap = argparse.ArgumentParser(description='Test download of expansion files')
ap.add_argument('-e', '--email', dest='email', help='google username')
ap.add_argument('-p', '--password', dest='password', help='google password')
args = ap.parse_args()
testApps = ['com.cpuid.cpu_z']
server = GooglePlayAPI(debug=True)
@ -11,7 +15,7 @@ server = GooglePlayAPI(debug=True)
# LOGIN
print('\nLogging in with email and password\n')
server.login(EMAIL, PASSWD, None, None)
server.login(args.email, args.password, None, None)
gsfId = server.gsfId
authSubToken = server.authSubToken
@ -90,7 +94,7 @@ for b in browse:
print('\nBrowsing the %s category\n' % browse[0]['catId'])
browseCat = server.browse(browse[0]['catId'])
for b in browseCat:
print('%s subcategory with %d apps' % (b['title'],len(b['apps'])))
print('%s subcategory with %d apps' % (b['title'], len(b['apps'])))
# LIST
@ -100,7 +104,7 @@ catList = server.list(cat)
for c in catList:
print(c)
print('\nList %s apps for %s category\n' % (catList[0],cat))
print('\nList %s apps for %s category\n' % (catList[0], cat))
appList = server.list(cat, catList[0])
for app in appList:
print(app['docId'])