• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

NoMore201/googleplay-api: Google Play Unofficial Python API

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

NoMore201/googleplay-api

开源软件地址(OpenSource Url):

https://github.com/NoMore201/googleplay-api

开源编程语言(OpenSource Language):

Python 98.2%

开源软件介绍(OpenSource Introduction):

Google play python API Build Status

This project contains an unofficial API for google play interactions. The code mainly comes from GooglePlayAPI project which is not maintained anymore. The code was updated with some important changes:

  • ac2dm authentication with checkin and device info upload
  • updated search and download calls
  • select the device you want to fake from a list of pre-defined values (check device.properties) (defaults to a OnePlus One)

Build

This is the recommended way to build the package, since setuptools will take care of generating the googleplay_pb2.py file needed by the library (check the setup.py)

$ python setup.py build

Usage

Check scripts in test directory for more examples on how to use this API.

from gpapi.googleplay import GooglePlayAPI

mail = "[email protected]"
passwd = "mypasswd"

api = GooglePlayAPI(locale="en_US", timezone="UTC", device_codename="hero2lte")
api.login(email=mail, password=passwd)

result = api.search("firefox")

for doc in result:
    if 'docid' in doc:
        print("doc: {}".format(doc["docid"]))
    for cluster in doc["child"]:
        print("\tcluster: {}".format(cluster["docid"]))
        for app in cluster["child"]:
            print("\t\tapp: {}".format(app["docid"]))

For first time logins, you should only provide email and password. The module will take care of initalizing the api, upload device information to the google account you supplied, and retrieving a Google Service Framework ID (which, from now on, will be the android ID of your fake device).

For the next logins you should save the gsfId and the authSubToken, and provide them as parameters to the login function. If you login again with email and password, this is the equivalent of re-initalizing your android device with a google account, invalidating previous gsfId and authSubToken.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap