0

我正在尝试编写一个 python 脚本来获取我的 goo.gl 短 URL 上的数字点击。我想我可以先尝试让这个样本工作:

https://github.com/google/google-api-python-client/tree/master/samples/urlshortener

我在client_secrets.json这里填写了这样的信息(实际上 client_id 和 client_secret 被混淆了):

{
  "other": {
    "client_id": "[['mYcLIent_1dapps.googleusercontent.com']]",
    "client_secret": "[['mYCLient_53cr3t']]",
    "redirect_uris": [],
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://accounts.google.com/o/oauth2/token"
  }
}

但是当我执行脚本时,我得到了这个:

$ ./urlshortener.py --logging_level=DEBUG
WARNING: Please configure OAuth 2.0

To make this sample run you will need to populate the client_secrets.json file
found at:

   ./client_secrets.json

with information from the APIs Console <https://code.google.com/apis/console>.
4

0 回答 0