fine_ants 1.8.4 → 1.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fine_ants/adapters/amex.rb +7 -1
- data/lib/fine_ants/adapters/vanguard.rb +1 -1
- data/lib/fine_ants/adapters/zillow.rb +17 -2
- data/lib/fine_ants/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1172b4e3fe328425ef87e41caec3a2c211c19eb
|
4
|
+
data.tar.gz: fe2e980bee738c6800b35ee3a733253711e3fdb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0af24a4bbdd5e9927bb0f7b61d61990887ba58776ec62659126400747ec8e2b4720bc403cb2c49e42d4264c82d7f8c5e822a8df2739b4c38cf405be4cd8e529
|
7
|
+
data.tar.gz: 1b11dfdc0670d498d95ea2b52fe26c7c270ee866e6863a613ac9a92647f5fe800ece4276fbeeb0b5fe23235cbf0b332ba58f580934b512ce81d9b22fbde88d6c
|
@@ -14,7 +14,7 @@ module FineAnts
|
|
14
14
|
within form_css do
|
15
15
|
fill_in "User ID", :with => @user
|
16
16
|
fill_in "Password", :with => @password
|
17
|
-
|
17
|
+
click_thing "Log In"
|
18
18
|
end
|
19
19
|
verify_login!
|
20
20
|
end
|
@@ -49,6 +49,12 @@ module FineAnts
|
|
49
49
|
rescue
|
50
50
|
raise FineAnts::LoginFailedError.new
|
51
51
|
end
|
52
|
+
|
53
|
+
def click_thing(locator)
|
54
|
+
click_link locator
|
55
|
+
rescue
|
56
|
+
click_button locator
|
57
|
+
end
|
52
58
|
end
|
53
59
|
end
|
54
60
|
end
|
@@ -13,15 +13,30 @@ module FineAnts
|
|
13
13
|
|
14
14
|
def download
|
15
15
|
visit "https://www.zillow.com/homedetails/total_nonsense/#{@user}_zpid/?fullpage=true"
|
16
|
-
zestimate =
|
16
|
+
zestimate = find_first(
|
17
|
+
'.estimates .home-summary-row:nth-child(2) span:nth-child(2)',
|
18
|
+
'.zestimate.primary-quote'
|
19
|
+
).text.match(/(\$.*)/)[1]
|
20
|
+
|
17
21
|
[{
|
18
22
|
:adapter => :zillow,
|
19
23
|
:user => @user,
|
20
24
|
:id => @user,
|
21
|
-
:name =>
|
25
|
+
:name => find_first('.addr h1', '.hdp-home-header-st-addr').text,
|
22
26
|
:amount => BigDecimal.new(zestimate.gsub(/[\$,]/,''))
|
23
27
|
}]
|
24
28
|
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def find_first(*locators)
|
33
|
+
locators.each do |locator|
|
34
|
+
begin
|
35
|
+
return find(locator)
|
36
|
+
rescue Capybara::ElementNotFound
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
25
40
|
end
|
26
41
|
end
|
27
42
|
end
|
data/lib/fine_ants/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fine_ants
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|