adops_report_scrapper 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f73d907ab72e7bcba77c9e1eafff91f72daff21d
4
- data.tar.gz: 5ec5d5e8cb7ee6a1c3af0d9b1a8a0be4d86f7795
3
+ metadata.gz: 6a7726d818edcbdd387a0e71920913c9bd7cbb4d
4
+ data.tar.gz: 10cbda15f234612d1aea6133f67d34198a4aba61
5
5
  SHA512:
6
- metadata.gz: e62658ee1076c29cb25211b33da49b0bb269f085179ccf96652b3f64fc4f6f1a31c53749112dce6a839832c3d9e4fc6261c759dca4ce7818f4dd71f8ef3c7c55
7
- data.tar.gz: 48cc873473653993bd48897bf113f827617b0e23e374c4454c0d0eaeafffed45eb9f864b27350e13ce3ef192bad3593afe85faf30a9513e04eca75218ba92e8d
6
+ metadata.gz: 22740395648458a558e3ab7dd5c9e52891cf4b07edd24f5b0768c22a0331f6f1f4e3bc1e98792bfae26c832e6c78290ef11d97f4ac3f38d4f33d7a6698f3271f
7
+ data.tar.gz: de038e6791f36446156590e1f9b0f2c35368e177b21a48992395f85eabfd0055fa4af6b8b112311ab2b0378588a56c06a53575b94df100982f690b45ff23227e
@@ -23,15 +23,22 @@ class AdopsReportScrapper::TremorClient < AdopsReportScrapper::BaseClient
23
23
 
24
24
  def request_report
25
25
  @client.find(:xpath, '//*[text()="REPORTS"]').click
26
- @client.find(:xpath, '//*[text()="Hierarchical"]').click
26
+ @client.find(:xpath, '//*[text()="Custom"]').click
27
+ sleep 1
28
+ @client.find(:xpath, '//*[text()="New"]').click
27
29
  sleep 1
28
30
  # select group by
29
- @client.find(:css, '#hierarchicalReportsGroupBys').click
30
- @client.find(:xpath, '//*[text()="AdUnit"]').click
31
- @client.find(:css, '#hierarchicalReportsGroupBys').click
32
- @client.find(:xpath, '//*[text()="Country"]').click
31
+ @client.find(:css, '#availableFieldsListSearch').click
32
+ @client.find(:xpath, '//*[text()="Supply Domain"]').click
33
+ @client.find(:xpath, '//*[text()="Ad Unit"]').click
34
+ @client.find(:xpath, '//*[text()="Requests"]').click
35
+ @client.find(:xpath, '//*[text()="Fills"]').click
36
+ @client.find(:xpath, '//*[text()="Impressions"]').click
37
+ @client.find(:xpath, '//*[text()="Completions"]').click
38
+ @client.find(:xpath, '//*[text()="Total Net Revenue"]').click
39
+ @client.find(:css, '.custom-report-dropdown-glyph.glyphicon-remove').click
33
40
  # select date
34
- @client.find(:css, '#hierarchicalReportsDateRange').click
41
+ @client.find(:css, '#customReportsDateRanges').click
35
42
  @client.find(:xpath, '//*[text()="Yesterday"]').click
36
43
  @client.click_button 'Run'
37
44
  sleep 10
@@ -46,6 +53,7 @@ class AdopsReportScrapper::TremorClient < AdopsReportScrapper::BaseClient
46
53
  end
47
54
 
48
55
  def extract_data_from_report
56
+ byebug
49
57
  rows = @client.find_all :xpath, '//table/*/tr'
50
58
  @data = rows.map { |tr| tr.find_css('td,th').map { |td| td.visible_text } }
51
59
  end
@@ -1,3 +1,3 @@
1
1
  module AdopsReportScrapper
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adops_report_scrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stayman Hou