lobbyliste 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lobbyliste/downloader.rb +7 -5
- data/lib/lobbyliste/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73c003d58cccb7ccc80e72ec7f849c52aa6e178a
|
4
|
+
data.tar.gz: b5105fe902c64a771190e62697b18f1a3fee2a67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf2df6717d00db0e6827f355551f58f0f2455405602b9805281116267c8d3bc11a59ee013c0e234adc95543e690b28569fcc4a6acc853dd1a08fe2169fa74dc4
|
7
|
+
data.tar.gz: d55faa49852d8b9c25906b12439449710e416e50369b5a3cf32a6e8fd61f0bdb47bb5153343276b55ae4aa22ce6e45e22ffea0736c89847365cfc98cb87c0ac8
|
@@ -37,18 +37,20 @@ module Lobbyliste
|
|
37
37
|
@pdf_link
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
#
|
40
|
+
# Since the link to the PDF changes with every new version we download the Lobbyliste website and extract the link
|
41
|
+
# Use this method to extract link from different page if the bundestag website structure is changed again
|
42
|
+
# @param [String] page that will be used to extract the PDF link. May change from time to time.
|
43
43
|
# @return [String] the link to the Lobbyliste pdf
|
44
|
-
def fetch_pdf_link
|
45
|
-
website = Nokogiri::HTML(open(
|
44
|
+
def fetch_pdf_link(bundestag_page = "https://www.bundestag.de/parlament/lobbyliste")
|
45
|
+
website = Nokogiri::HTML(open(bundestag_page))
|
46
46
|
link = website.css("a[title^='Aktuelle Fassung']").first
|
47
47
|
|
48
48
|
raise NoPdfLinkFound.new("Could not find link to the Lobbyist PDF on the bundestag website!") unless link
|
49
49
|
@pdf_link = "https://bundestag.de#{link['href']}"
|
50
50
|
end
|
51
51
|
|
52
|
+
private
|
53
|
+
|
52
54
|
def http_version_of_url(url)
|
53
55
|
url.gsub('https://', 'http://')
|
54
56
|
end
|
data/lib/lobbyliste/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lobbyliste
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DarthMax
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.
|
167
|
+
rubygems_version: 2.6.11
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: Ruby crawler for the list of lobbyists published by German Bundestag
|