2014年6月19日 星期四

Google Developers Console 與自動化下載Google Play 商店銷售報告 ( Gsutil Tool 教學 )

===========   以下廢話  ===========

拖了好久要寫的 google gsutil 終於很不怕死的在忙碌之中偷偷完成了
主要還是因為要安裝 gsutil ,實在好懶~"~

===========   以上廢話  ===========

前陣子因為工作上剛好碰到了這個東西,主要是透過 gsutil 這個工具
去下載 google play 的營運報表。
使用 gsutil 的人可以在不知道 google play 的帳號下,順利取得相關報表。
只要利用 gsutil 所產生出的授權,交給 google play 的帳號所有人同意後
即可順利取得報表。


1.安裝 gsutil

請跟著官方教學安裝。


1 Python: 請選擇下載Python 2.7.7 Windows Installer, Python 2.7.7 Windows X86-64 Installer測試時不太順利。(目前最新為2.7.7)

安裝 Python於預設路徑 (for example, C:\Python27)

2. gsutil:下載gsutil.zip。解壓至such as C:\

2. 設定環境變數

1.至控制台\系統及安全性\系統\進階設定

2.環境變數設定
環境變數
變數
系統變數
Path
C:\Python27;C:\gsutil;
使用者變數
PYTHONPATH
C:\gsutil\third_party\boto

3. 設定gsutil認證config

開始\執行\cmd
cd\ --切換至根目錄c:\
cd gstuil –切至gsutil
c:\gstuil>python gsutil config

若發生上面錯誤那就表示以經在這個使用者上設定了config,需至該目錄將檔案刪除。
順利的話,應該是下面的結果,產生設定檔:

並產生提供給對方的url認證位址



當對方同意認證後,會提供Read認證code


Project id、(請對方到取得 https://cloud.google.com/console#/project)


pubsite_prod

其中Read認證codeProject codeconfig設定過程中設定後,即可使用。

4. 使用gsutil

C:\gsutil>python gsutil ls gs://pubsite_prod_rev_xxxxxxxxxxxxxxxx 
即可查看目錄內的檔案
C:\gsutil>python gsutil cp -r gs://pubsite_prod_rev_xxxxxxxxxxxxxxxx/ D:\你要存放的檔案位置
可複製整個目錄內的檔案

=============================================

google play 帳號方設定

1. Project id 的取得

1.先到 developers console 建立一個新的專案。

2.設定授權帳號




















設定完成後把專案ID給使用 gsutil 的人。


2. google play 設定與 pubsite_prod_ID 取得

1.到 google play 管理頁面,選擇設定>使用者帳戶與權限>邀請新增使用者















2.邀請在第一步驟的 yourAccount@mail.com 同個帳號,並給這個帳號查看財務報告的權限。

3.選擇財務報表取得 pubsite_prod_id

4.把pubsite_prod_id 給 gsutil 使用者,教學到這邊應該就能夠順利取得財務報表了。

2 則留言:

  1. Golden Fish Casino Review: Welcome bonus, bonus & games 카지노 카지노 다파벳 다파벳 カジノ シークレット カジノ シークレット jeetwin jeetwin 카지노 카지노 jeetwin jeetwin ラッキーニッキー ラッキーニッキー 517 V-bet.com Keyring - Pro Situs Slot Online Gacor

    回覆刪除
  2. Lucky casino | JTM Hub
    Lucky casino 과천 출장안마 is home to over 2000 slot machines and the latest 세종특별자치 출장마사지 online slots. With over 2000 games including classic and 구리 출장안마 top online slots.Jumba 양산 출장샵 Casino: Play Here! 제주 출장샵

    回覆刪除