Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: tmurakam/android-checkout-scraper
base: 58fcc8eb6a
...
head fork: tmurakam/android-checkout-scraper
compare: cff3b4a0db
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 19, 2012
Cornelius Hald Added code to get the *estimated* sales report as well. ac0d8fc
Commits on Apr 20, 2012
@tmurakam Merge pull request #2 from connyhald/master
Added code to get *estimated* sales report
cff3b4a
Showing with 34 additions and 0 deletions.
  1. +7 −0 android_checkout_scraper.rb
  2. +27 −0 get-estimated-sales-report.rb
View
7 android_checkout_scraper.rb
@@ -72,6 +72,13 @@ def getSalesReport(year, month)
try_get(url)
return @agent.page.body
end
+
+ # Get merchant etimated sales report
+ def getEstimatedSalesReport(year, month)
+ url = sprintf('https://play.google.com/apps/publish/salesreport/download?report_date=%04d_%02d&report_type=sales_report&dev_acc=%s', year, month, @dev_acc)
+ try_get(url)
+ return @agent.page.body
+ end
# Get order list
# startDate: start date (yyyy-mm-ddThh:mm:ss)
View
27 get-estimated-sales-report.rb
@@ -0,0 +1,27 @@
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+
+require './android_checkout_scraper'
+require './secrets.rb'
+require './config.rb'
+
+if (ARGV.size != 2)
+ STDERR.puts "Usage: #{$0} <year> <month>"
+ exit 1
+end
+
+year = ARGV[0].to_i
+month = ARGV[1].to_i
+
+scraper = AndroidCheckoutScraper.new
+if ($proxy_host != nil)
+ scraper.proxy_host = $proxy_host
+ scraper.proxy_port = $proxy_port
+end
+
+scraper.email = $email_address
+scraper.password = $password
+scraper.dev_acc = $dev_acc
+
+csv = scraper.getEstimatedSalesReport(year, month)
+puts csv

No commit comments for this range

Something went wrong with that request. Please try again.