Ejemplo n.º 1
0
    session.login("*****@*****.**", "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)
Ejemplo n.º 2
0
    # 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)