consadole_aggregator 0.2.10 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4473bf7c058016b373e4d3219de8e0d59a4a4deb
4
- data.tar.gz: 03d8f2221c77c21f3bed5e97a89d087ff0968d47
3
+ metadata.gz: 0d6d34a4f6c1faf943eb65da41923ce5846109dd
4
+ data.tar.gz: 06b951957f70a5bf5118569db40f8a98f343abae
5
5
  SHA512:
6
- metadata.gz: d55bc2ad8bf05a7586949c9189fa3bbaae07bea03cd3ed542f37311f20c2291fb15db943c2260b1145274f7123cc494abad9fe463a17d515b36200299c24394d
7
- data.tar.gz: 79acda13880ccfcee53db99705a2cfd9e0ba18f8b42938d8e901e7a1c5d90911a291f93570207a47a4d742d789f9d6f53d2ce48a34f407f78ba57e41ed8c7895
6
+ metadata.gz: 54223945e90efd5aab1c923760ff92d91467ec9d8bd5672e0a9103d00a3cb79e065560cf125350a1fc277d46c04e5521fbda92d27d652fbc210d328698cb2d0b
7
+ data.tar.gz: 9fd05209ed5bc2d05564299c04c0f0b4d1656faff3412ff4000c128510b8a2a950075b6d0c3289b7b603bb03f382f149b14f5731b6ed4d6da5c0b84c83b1e662
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- consadole_aggregator (0.2.10)
4
+ consadole_aggregator (0.2.11)
5
5
  eventmachine
6
6
  httpclient
7
7
  nokogiri
@@ -170,9 +170,10 @@ module ConsadoleAggregator
170
170
  }
171
171
  site.filter_article { |article| article.title =~ /札幌/ }
172
172
  site.parse_article { |article|
173
- entry_point = HTTPClient.get(article.link).header['location'].first
174
- c = HTTPClient.get(entry_point) while c.status == 301
175
- { url: c.header['location'].first, title: article.title }
173
+ # redirect twice
174
+ c1 = HTTPClient.get(article.link)
175
+ c2 = HTTPClient.get(c1.header['location'].first)
176
+ { url: c2.header['location'].first, title: article.title }
176
177
  }
177
178
  end
178
179
 
@@ -188,9 +189,10 @@ module ConsadoleAggregator
188
189
  }
189
190
  site.filter_article { |article| article.title =~ /札幌/ }
190
191
  site.parse_article { |article|
191
- entry_point = HTTPClient.get(article.link).header['location'].first
192
- c = HTTPClient.get(entry_point) while c.status == 301
193
- { url: c.header['location'].first, title: article.title }
192
+ # redirect twice
193
+ c1 = HTTPClient.get(article.link)
194
+ c2 = HTTPClient.get(c1.header['location'].first)
195
+ { url: c2.header['location'].first, title: article.title }
194
196
  }
195
197
  end
196
198
 
@@ -1,3 +1,3 @@
1
1
  module ConsadoleAggregator
2
- VERSION = "0.2.10"
2
+ VERSION = "0.2.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consadole_aggregator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - niku