Esempio n. 1
0
 def connect_to_googleplay_api(self):
     api = GooglePlayAPI(androidId=self.config["android_id"],
                         lang=self.config["language"])
     error = None
     try:
         if self.token is False:
             logging(self, "Using credentials to connect to API")
             username = self.config["gmail_address"]
             passwd = None
             if self.config["gmail_password"]:
                 logging(self, "Using plaintext password")
                 passwd = self.config["gmail_password"]
             elif self.config["keyring_service"] and HAVE_KEYRING == True:
                 passwd = keyring.get_password(
                     self.config["keyring_service"], username)
             elif self.config["keyring_service"] and HAVE_KEYRING == False:
                 print "You asked for keyring service but keyring package is not installed"
                 sys.exit(ERRORS.KEYRING_NOT_INSTALLED)
             api.login(username, passwd, None)
         else:
             logging(self, "Using token to connect to API")
             api.login(None, None, self.token)
     except LoginError, exc:
         error = exc.value
         success = False
Esempio n. 2
0
 def connect_to_googleplay_api(self):
     api = GooglePlayAPI(androidId=self.config["android_id"], lang=self.config["language"])
     error = None
     try:
         api.login(self.config["gmail_address"], self.config["gmail_password"], None)
     except LoginError, exc:
         error = exc.value
         success = False
def connect():
    api = GooglePlayAPI(androidId=config.ANDROID_ID, lang=config.LANG)
    try:
        api.login(config.GOOGLE_LOGIN, config.GOOGLE_PASSWORD,
                  config.AUTH_TOKEN)
    except LoginError, exc:
        logging.error("Connection to PlayStore failed: %s" % exc)
        return None
Esempio n. 4
0
def get_googleplay_api():
    #default credentials
    LANG = "fr_FR"
    ANDROID_ID = "32AA74CDC05B26A9"
    GOOGLE_LOGIN = "******"
    GOOGLE_PASSWORD = "******"
    AUTH_TOKEN = None

    api = GooglePlayAPI(androidId=ANDROID_ID, lang=LANG)
    api.login(GOOGLE_LOGIN, GOOGLE_PASSWORD, AUTH_TOKEN)
    return api
Esempio n. 5
0
    def connect_to_googleplay_api(self):
        AUTH_TOKEN = None

        api = GooglePlayAPI(androidId=self.config["android_id"],
                            lang=self.config["language"])
        try:
            api.login(self.config["gmail_address"],
                      self.config["gmail_password"], AUTH_TOKEN)
        except LoginError, exc:
            print exc.value
            success = False
Esempio n. 6
0
 def connect_to_googleplay_api(self):
     api = GooglePlayAPI(androidId=self.config["android_id"],
                         lang=self.config["language"])
     error = None
     try:
         if self.token is False:
             if self.verbose:
                 print "Using credentials to connect to API"
             api.login(self.config["gmail_address"],
                       self.config["gmail_password"], None)
         else:
             if self.verbose:
                 print "Using token to connect to API"
             api.login(None, None, self.token)
     except LoginError, exc:
         error = exc.value
         success = False
Esempio n. 7
0
    def connect_to_googleplay_api(self):
        AUTH_TOKEN = None

        api = GooglePlayAPI(androidId=config["android_ID"],
                            lang=config["language"])
        try:
            api.login(config["gmail_address"], config["gmail_password"],
                      AUTH_TOKEN)
        except LoginError, exc:
            print exc.value
            dlg = wx.MessageDialog(
                self, "%s.\nUsing default credentials may solve the issue" %
                exc.value, 'Connection to Play store failed',
                wx.OK | wx.ICON_INFORMATION)
            dlg.ShowModal()
            dlg.Destroy()
            success = False