Skip to content

Commit

Permalink
Remove email and password from test files
Browse files Browse the repository at this point in the history
Signed-off-by: Domenico Iezzi <[email protected]>
  • Loading branch information
Domenico Iezzi committed Oct 17, 2017
1 parent 6857b15 commit a77b362
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
20 changes: 11 additions & 9 deletions obb_download_test.py
Original file line number Diff line number Diff line change
@@ -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 changes: 9 additions & 5 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
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)

# 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

Expand Down Expand Up @@ -90,7 +94,7 @@
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

Expand All @@ -100,7 +104,7 @@
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'])

0 comments on commit a77b362

Please sign in to comment.