rfeedparser_ictv 0.9.931 → 0.9.932
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rfeedparser.rb +12 -3
- metadata +2 -2
data/lib/rfeedparser.rb
CHANGED
@@ -56,7 +56,7 @@ include FeedParserUtilities
|
|
56
56
|
|
57
57
|
|
58
58
|
module FeedParser
|
59
|
-
Version = "0.9.
|
59
|
+
Version = "0.9.932"
|
60
60
|
|
61
61
|
License = """Copyright (c) 2002-2006, Mark Pilgrim, All rights reserved.
|
62
62
|
|
@@ -175,12 +175,21 @@ module FeedParser
|
|
175
175
|
newd["Content-Location"] = options[:content_location] unless options[:content_location].nil?
|
176
176
|
newd["Content-Language"] = options[:content_language] unless options[:content_language].nil?
|
177
177
|
newd["Content-type"] = options[:content_type] unless options[:content_type].nil?
|
178
|
-
|
178
|
+
|
179
179
|
f = open(furi, newd)
|
180
|
+
|
180
181
|
end
|
181
182
|
|
182
183
|
data = f.read
|
183
184
|
f.close
|
185
|
+
|
186
|
+
rescue OpenURI::HTTPError => e
|
187
|
+
unless e.to_s[0..2].to_i == 0
|
188
|
+
result['status'] = e.to_s[0..2].to_i
|
189
|
+
data = ''
|
190
|
+
f = nil
|
191
|
+
end
|
192
|
+
|
184
193
|
rescue => e
|
185
194
|
$stderr << "Rescued in parse: "+e.to_s+"\n" if $debug # My addition
|
186
195
|
result['bozo'] = true
|
@@ -192,7 +201,7 @@ module FeedParser
|
|
192
201
|
result['etag'] = f.meta['etag']
|
193
202
|
result['modified'] = f.meta['modified']
|
194
203
|
result['url'] = f.base_uri.to_s
|
195
|
-
result['status']
|
204
|
+
result['status'] ||= f.status[0].to_i
|
196
205
|
result['headers'] = f.meta
|
197
206
|
end
|
198
207
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rfeedparser_ictv
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.9.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.9.932
|
7
|
+
date: 2007-08-06 00:00:00 -07:00
|
8
8
|
summary: Parse RSS and Atom feeds in Ruby
|
9
9
|
require_paths:
|
10
10
|
- lib
|