コード例 #1
0
from pprint import pprint

import market_proto
from androidmarket import MarketSession

if __name__ == "__main__":
    # Start a new session and login
    session = MarketSession()
    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)
コード例 #2
0
#!/usr/bin/env python

from pprint import pprint

import market_proto
from androidmarket import MarketSession

import sys
import json

if __name__ == "__main__":
    # Start a new session and login
    session = MarketSession()
    session.login("", "")

    # Search for "bankdroid" on the market and print the first result
    #    query = raw_input('Please enter a pkg name to search: ')
    query = sys.argv[1]
    results = session.searchApp(query)
    if len(results) == 0:
        print json.dumps({"error": "Application not found."})
        exit()

    apklist = []
    for app in results:
        apk = {}
        apk["version"] = app["version"]
        apk["title"] = app["title"]
        apk["id"] = app["id"]
        apk["packagename"] = app["packagename"]
        apklist.append(apk)
コード例 #3
0
from pprint import pprint
import market_proto

from androidmarket import MarketSession
if __name__ == "__main__":
    # Start a new session and login
    session = MarketSession()
    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")
コード例 #4
0
ファイル: search.py プロジェクト: annonapk/annonapk
#!/usr/bin/env python

from pprint import pprint

import market_proto
from androidmarket import MarketSession

import sys
import json

if __name__ == "__main__":
    # Start a new session and login
    session = MarketSession()
    session.login("", "")

    # Search for "bankdroid" on the market and print the first result
#    query = raw_input('Please enter a pkg name to search: ')
    query = sys.argv[1]
    results = session.searchApp(query)
    if len(results) == 0:
        print json.dumps({"error": "Application not found."});
        exit()

    apklist = []
    for app in results:
        apk = {}
        apk["version"] = app["version"]
        apk["title"] = app["title"]
        apk["id"] = app["id"]
        apk["packagename"] = app["packagename"]
        apklist.append(apk)
コード例 #5
0
from pprint import pprint

import market_proto
from androidmarket import MarketSession

if __name__ == "__main__":
    # Start a new session and login
    session = MarketSession()
    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"],