fine_ants 1.5.0 → 1.6.0
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/zillow.rb +31 -0
- data/lib/fine_ants/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 550c868377f6b3c033bce3928ed56160f416f00f
|
4
|
+
data.tar.gz: 810e72fa9d9618a29138384ce9c3a3e0c43dc7e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4396455676416f89d49b63dc80aefde734b417ad24ff618a8152407b4d292107b73412a54f8788c3dafd5802ea96d298df5bfed5a9d796d6aee180e07ffca686
|
7
|
+
data.tar.gz: 7f4f96f5c8065f3140eaeb87a41cdd46e28e9ede037ffed32f6e7447f9a4d5d307f4f5e0cbeb776057d0d711e824ce1f250c3c4695f0c7a6321d17072a28d655
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "bigdecimal"
|
2
|
+
|
3
|
+
module FineAnts
|
4
|
+
module Adapters
|
5
|
+
class Zillow
|
6
|
+
def initialize(credentials)
|
7
|
+
@user = credentials[:user]
|
8
|
+
end
|
9
|
+
|
10
|
+
def login
|
11
|
+
return true # No login necessary
|
12
|
+
end
|
13
|
+
|
14
|
+
def download
|
15
|
+
visit "https://www.zillow.com/homedetails/total_nonsense/#{@user}_zpid/?fullpage=true"
|
16
|
+
zestimate = find('.estimates .home-summary-row:nth-child(2) span:nth-child(2)').text
|
17
|
+
[{
|
18
|
+
:adapter => :zillow,
|
19
|
+
:user => @user,
|
20
|
+
:id => @user,
|
21
|
+
:name => find('.addr h1').text,
|
22
|
+
:amount => BigDecimal.new(zestimate.gsub(/[\$,]/,''))
|
23
|
+
}]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
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.
|
4
|
+
version: 1.6.0
|
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-07-
|
11
|
+
date: 2017-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/fine_ants/adapters/strs.rb
|
108
108
|
- lib/fine_ants/adapters/target.rb
|
109
109
|
- lib/fine_ants/adapters/vanguard.rb
|
110
|
+
- lib/fine_ants/adapters/zillow.rb
|
110
111
|
- lib/fine_ants/capybara_setup.rb
|
111
112
|
- lib/fine_ants/login_failed_error.rb
|
112
113
|
- lib/fine_ants/runner.rb
|