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" ap = argparse.ArgumentParser(description='Test download of expansion files')
PASSWD = "inpobgakicfmnhwc" 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) server = GooglePlayAPI(debug=True)
# LOGIN # LOGIN
print('\nLogging in with email and password\n') 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: with open(download['docId'] + '.apk', 'wb') as first:
first.write(download['data']) first.write(download['data'])
print('\nDownload successful\n')
for obb in download['additionalData']: for obb in download['additionalData']:
name = obb['type'] + '.' + str(obb['versionCode']) + '.' + download['docId'] + '.obb' name = obb['type'] + '.' + str(obb['versionCode']) + '.' + download['docId'] + '.obb'
with open(name, 'wb') as second: with open(name, 'wb') as second:
second.write(obb['data']) second.write(obb['data'])
print('\nDownloaded additional data\n')
print('\nDownload successful\n')

10
test.py
View File

@ -1,9 +1,13 @@
from gpapi.googleplay import GooglePlayAPI, RequestError from gpapi.googleplay import GooglePlayAPI, RequestError
import sys import sys
import argparse
EMAIL = "maracaiboez" ap = argparse.ArgumentParser(description='Test download of expansion files')
PASSWD = "fjgozwjmkwyvvutt" 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'] testApps = ['com.cpuid.cpu_z']
server = GooglePlayAPI(debug=True) server = GooglePlayAPI(debug=True)
@ -11,7 +15,7 @@ server = GooglePlayAPI(debug=True)
# LOGIN # LOGIN
print('\nLogging in with email and password\n') 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 gsfId = server.gsfId
authSubToken = server.authSubToken authSubToken = server.authSubToken