html2rss 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Gemfile.lock +8 -5
- data/LICENSE +1 -1
- data/html2rss.gemspec +2 -1
- data/lib/html2rss/item.rb +6 -1
- data/lib/html2rss/version.rb +1 -1
- metadata +20 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d23c5f38ec394aa7a095ed72fe438bbb7480e56e3f1466afccf8b15640ad3ea
|
4
|
+
data.tar.gz: 9cf409fb2b00a21964e91ee81882dc626b47a9a37a5dd7817b59048197f44e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4650b3337acea8b93a0d73279e401c3790b67ff9e311e21782e1a892e58d5dd156ce7c649e961b36031d046d4c272042c5ecba6e185fc91a42718ef345aea40c
|
7
|
+
data.tar.gz: 76a3d9517ea0f5e6f6f12b1de803cbe1bc1cc5b7f5401a8bf5c3cf3de544b3580ab23bfe9be8964e5fb5b1da8b35184ce1bfea418808c447812b8d99def8897c
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,7 +3,8 @@ PATH
|
|
3
3
|
specs:
|
4
4
|
html2rss (0.2.1)
|
5
5
|
faraday (~> 0.15)
|
6
|
-
|
6
|
+
faraday_middleware (~> 0.13)
|
7
|
+
nokogiri (>= 1.10)
|
7
8
|
sanitize (~> 5.0)
|
8
9
|
|
9
10
|
GEM
|
@@ -13,13 +14,15 @@ GEM
|
|
13
14
|
crass (1.0.4)
|
14
15
|
diff-lcs (1.3)
|
15
16
|
docile (1.3.1)
|
16
|
-
faraday (0.15.
|
17
|
+
faraday (0.15.4)
|
17
18
|
multipart-post (>= 1.2, < 3)
|
19
|
+
faraday_middleware (0.13.0)
|
20
|
+
faraday (>= 0.7.4, < 1.0)
|
18
21
|
json (2.1.0)
|
19
|
-
mini_portile2 (2.
|
22
|
+
mini_portile2 (2.4.0)
|
20
23
|
multipart-post (2.0.0)
|
21
|
-
nokogiri (1.
|
22
|
-
mini_portile2 (~> 2.
|
24
|
+
nokogiri (1.10.1)
|
25
|
+
mini_portile2 (~> 2.4.0)
|
23
26
|
nokogumbo (2.0.1)
|
24
27
|
nokogiri (~> 1.8, >= 1.8.4)
|
25
28
|
rspec (3.8.0)
|
data/LICENSE
CHANGED
data/html2rss.gemspec
CHANGED
@@ -29,7 +29,8 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ['lib']
|
30
30
|
|
31
31
|
spec.add_dependency 'faraday', '~> 0.15'
|
32
|
-
spec.add_dependency '
|
32
|
+
spec.add_dependency 'faraday_middleware', '~> 0.13'
|
33
|
+
spec.add_dependency 'nokogiri', '>= 1.10'
|
33
34
|
spec.add_dependency 'sanitize', '~> 5.0'
|
34
35
|
spec.add_development_dependency 'bundler', '~> 1.16'
|
35
36
|
spec.add_development_dependency 'byebug', '~> 10.0'
|
data/lib/html2rss/item.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'faraday'
|
2
|
+
require 'faraday_middleware'
|
2
3
|
require 'open-uri'
|
3
4
|
require 'nokogiri'
|
4
5
|
require_relative 'item_extractor'
|
@@ -47,7 +48,11 @@ module Html2rss
|
|
47
48
|
end
|
48
49
|
|
49
50
|
def self.from_url(url, config)
|
50
|
-
connection = Faraday.new(url: url, headers: config.headers)
|
51
|
+
connection = Faraday.new(url: url, headers: config.headers) { |faraday|
|
52
|
+
faraday.use FaradayMiddleware::FollowRedirects
|
53
|
+
faraday.adapter Faraday.default_adapter
|
54
|
+
}
|
55
|
+
|
51
56
|
page = Nokogiri::HTML(connection.get.body)
|
52
57
|
page.css(config.selector('items')).map do |xml_item|
|
53
58
|
new xml_item, config
|
data/lib/html2rss/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html2rss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gil Desmarais
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -25,19 +25,33 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.15'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: faraday_middleware
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0.13'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0.13'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: nokogiri
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.10'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.10'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: sanitize
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -177,8 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
191
|
- !ruby/object:Gem::Version
|
178
192
|
version: '0'
|
179
193
|
requirements: []
|
180
|
-
|
181
|
-
rubygems_version: 2.7.8
|
194
|
+
rubygems_version: 3.0.2
|
182
195
|
signing_key:
|
183
196
|
specification_version: 4
|
184
197
|
summary: Generate RSS feeds by scraping websites by providing a config.
|