scrape456 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 744e74e6c259bd66a1c1c5de1e9bf14ecd9dcdc3ea220ee4ede52722444a6df0
4
- data.tar.gz: 4ba0ef0d9fc9402b4b7e85eeccccddab3be4379b0488808497f4c926d5021afc
3
+ metadata.gz: 86cdfdd503caec47e09ba8d722e252680e9e69cc9d59dcf196edbe72378992c5
4
+ data.tar.gz: 508bdc49b06da1bff9aa43d77c0d034dde085386020216570adab0176d6d6ffc
5
5
  SHA512:
6
- metadata.gz: 6fc0541f5347b32c32d8b4ad5c8e68b7977eb0ca2f4853c889cbf273906d358861036a5779e8c999efbf0536826448da9350f51b702e57d0aad08c19c12ad05d
7
- data.tar.gz: 76fa66b62cfa1ef92482d96b9aec49593df98a49741822cad0bfdae4519fa94f03328ba0670f44e300bc55bfa80837adaa5183ec8867f4da328258e0e7055bb3
6
+ metadata.gz: 279b61a1752a77fd007f5653c5709807620868a07e15ac7f41d26266b002caf74ef11e6fc84ec39e0235e48fda07124bc623aeb4365bbb85e2beec0254ccbc62
7
+ data.tar.gz: aeb8d46512b8d52991ba87df4d12db8017447b274d2a692ce90032773bec17599301adfebb9aa289bf27628609840418d78ce22a6eff28a8cb476794125e962e
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ scrape456-*.gem
data/Gemfile.lock CHANGED
@@ -3,7 +3,7 @@ PATH
3
3
  specs:
4
4
  scrape456 (0.1.0)
5
5
  poltergeist (~> 1.17)
6
- rspec (~> 3.7.0)
6
+ rspec (~> 3.7)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -21,6 +21,13 @@ module Scrape456
21
21
 
22
22
  LOGIN_URL = 'https://redirect.123signup.com/login'
23
23
  ONLOAD_REDIRECT_XPATH = "//body[contains(@onload,'pageLoadRedirect')]"
24
+
25
+ # Machine-generated: pulled from Firefox dev tools. But it works, where my
26
+ # handcrafted XPath did not.
27
+ REPORT_TAB_LINK_CSS_SELECTOR = 'body > form:nth-child(1) > table:nth-child(3) > ' +
28
+ 'tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2) > table:nth-child(1) > ' +
29
+ 'tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(7) > a:nth-child(1)'
30
+
24
31
  THIRTY_SECONDS = 30
25
32
 
26
33
  def initialize(username:, password:)
@@ -90,9 +97,13 @@ module Scrape456
90
97
  STDERR.puts 'Logging in to 123Signup...'
91
98
  log_in
92
99
  session.within_frame('FrameApplication') do
100
+ session.within_frame('top_menu') do
101
+ STDERR.puts 'Navigating to reports tab...'
102
+ session.find(REPORT_TAB_LINK_CSS_SELECTOR).click
103
+ end
93
104
  session.within_frame('contents') do
94
105
  session.within_frame('MenuList') do
95
- STDERR.puts 'Navigating to reports...'
106
+ STDERR.puts 'Navigating to event reports...'
96
107
  session.click_link 'Event Reports'
97
108
  end
98
109
  session.within_frame('Results') do
@@ -1,3 +1,3 @@
1
1
  module Scrape456
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrape456
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Platte
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-08 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: poltergeist