adops_report_scrapper 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 621cd534ecc5787d5bfb530df698368cd5a35192
|
4
|
+
data.tar.gz: 5829ab9f65422f983e7ae14ce2f4f69e84571bd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4422f5abd73ee590509137a1b95d84bd3fe621f341ed80c4f7088cd9258c5c06c7ae0c1b48357b4e87c30eba770a316d96054d47b4d74d4f41179c07504bcae
|
7
|
+
data.tar.gz: 19a34c321a2b22c62d101b89abe4e92ca80ad3470a87d9c8e1a50907515d30b9c2fcbbbd0d47b1fa5522d53967bf748d38bab26a90e4d08ccb5728d4df0f0848
|
@@ -2,6 +2,12 @@ require 'date'
|
|
2
2
|
require_relative 'base_client'
|
3
3
|
|
4
4
|
class AdopsReportScrapper::AdiplyClient < AdopsReportScrapper::BaseClient
|
5
|
+
def date_supported?(date = nil)
|
6
|
+
_date = date || @date
|
7
|
+
return true if _date >= Date.today - 28
|
8
|
+
false
|
9
|
+
end
|
10
|
+
|
5
11
|
private
|
6
12
|
|
7
13
|
def login
|
@@ -17,7 +23,7 @@ class AdopsReportScrapper::AdiplyClient < AdopsReportScrapper::BaseClient
|
|
17
23
|
end
|
18
24
|
|
19
25
|
def scrap
|
20
|
-
zones = @client.find_all(:css, '#
|
26
|
+
zones = @client.find_all(:css, '#form_zoneId > option')
|
21
27
|
zones = zones.to_a
|
22
28
|
zones.shift
|
23
29
|
zones = zones.map { |zone| zone.text }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adops_report_scrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stayman Hou
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|