Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (30 sloc) 1.018 kb
from pprint import pprint
import market_proto
from androidmarket import MarketSession
if __name__ == "__main__":
# Start a new session and login
session = MarketSession()
session.login("user@gmail.com", "password")
# Search for "bankdroid" on the market and print the first result
results = session.searchApp("bankdroid")
if len(results) == 0:
print "No results found"
exit()
app = results[0]
pprint(app)
# Print the last two comments for the app
results = session.getComments(app["id"])
pprint(results[:2])
# Download and save the first screenshot
data = session.getImage(app["id"])
f = open("screenshot.png", "wb")
f.write(data)
f.close()
# Download and save the app icon
data = session.getImage(app["id"], imagetype=market_proto.GetImageRequest.ICON)
f = open("icon.png", "wb")
f.write(data)
f.close()
# Get all the categories and subcategories
results = session.getCategories()
pprint(results)
Jump to Line
Something went wrong with that request. Please try again.