rfeedfinder 0.9.11 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/rfeedfinder.rb +4 -2
- data/lib/rfeedfinder/version.rb +1 -1
- data/test/test_helper.rb +1 -0
- data/test/test_rfeedfinder.rb +16 -1
- data/website/index.html +3 -3
- data/website/index.txt +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/rfeedfinder.rb
CHANGED
@@ -39,6 +39,7 @@ module Rfeedfinder
|
|
39
39
|
data.search(regexp).map!{|link|
|
40
40
|
if !link.to_s.strip.empty? and link.kind_of? Hpricot::Elem and !(link.kind_of? Hpricot::Text)
|
41
41
|
uri = link[:href].to_s
|
42
|
+
uri = link[:HREF].to_s if uri.empty?
|
42
43
|
uri = link[:src].to_s if uri.empty?
|
43
44
|
uri = link[:SRC].to_s if uri.empty?
|
44
45
|
if !uri.strip.empty? and uri !~ /^javascript/
|
@@ -82,6 +83,7 @@ module Rfeedfinder
|
|
82
83
|
#puts "Verify #{feed} - code: #{response.code}"
|
83
84
|
if response.code == "302"
|
84
85
|
newuri = response.body.match(/<a href=\"([^>]+)\">/)[1]
|
86
|
+
|
85
87
|
feedlist.delete(feed)
|
86
88
|
feedlist << newuri
|
87
89
|
feedlist.uniq!
|
@@ -160,7 +162,7 @@ module Rfeedfinder
|
|
160
162
|
return feeds(newuri, all=all, querySyndic8=querySyndic8, _recurs=_recurs)
|
161
163
|
end
|
162
164
|
end
|
163
|
-
|
165
|
+
|
164
166
|
#verify frameset
|
165
167
|
frames = getFrameLinks(data, fulluri)
|
166
168
|
frames.each {|newuri|
|
@@ -175,7 +177,7 @@ module Rfeedfinder
|
|
175
177
|
# nope, it's a page, try LINK tags first
|
176
178
|
outfeeds = getLinks(data, fulluri)
|
177
179
|
outfeeds.select {|link| isFeed?(link)}
|
178
|
-
|
180
|
+
|
179
181
|
#_debuglog('found %s feeds through LINK tags' % len(outfeeds))
|
180
182
|
if outfeeds.empty?
|
181
183
|
# no LINK tags, look for regular <A> links that point to feeds
|
data/lib/rfeedfinder/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
data/test/test_rfeedfinder.rb
CHANGED
@@ -124,10 +124,25 @@ class TestRfeedfinder < Test::Unit::TestCase
|
|
124
124
|
feed_finder "http://www.arteleku.net/4.1/blog/laburrak/?feed=rss2", "http://www.arteleku.net/4.1/blog/laburrak/?feed=rss2"
|
125
125
|
end
|
126
126
|
|
127
|
+
def test_unrecognized_feed
|
128
|
+
feed_finder "http://www.gobmenorca.com/noticies/RSS"
|
129
|
+
end
|
130
|
+
|
127
131
|
def test_maria
|
128
132
|
#feed_finder "http://www.carmenfernandez.net"
|
129
133
|
#feed_finder "http://getxogorria.blogcindario.com"
|
130
134
|
#feed_finder "http://jeanpaulmarat.blogspot.com"
|
131
|
-
feed_finder "http://resistiendocavernablogcindario.com"
|
135
|
+
#feed_finder "http://resistiendocavernablogcindario.com"
|
136
|
+
# feed = feed_finder "http://enredadera.bbvablogs.com/"
|
137
|
+
# feed = feed_finder "http://arfues.net/weblog"
|
138
|
+
feed = feed_finder "http://elsantacrucenio.com/index.php?option=com_rss&feed=RSS0.91&no_html=1"
|
139
|
+
end
|
140
|
+
|
141
|
+
def test_bbva
|
142
|
+
feed_finder "http://prueba.bbvablogs.com/feed/"
|
143
|
+
end
|
144
|
+
|
145
|
+
def test_nytimes
|
146
|
+
feed_finder "http://www.nytimes.com/"
|
132
147
|
end
|
133
148
|
end
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>rfeedfinder</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rfeedfinder"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/rfeedfinder" class="numbers">0.9.
|
36
|
+
<a href="http://rubyforge.org/projects/rfeedfinder" class="numbers">0.9.12</a>
|
37
37
|
</div>
|
38
38
|
<h2>What</h2>
|
39
39
|
|
@@ -82,7 +82,7 @@ Rfeedfinder.feeds('scripting.com')
|
|
82
82
|
<h2>License</h2>
|
83
83
|
|
84
84
|
|
85
|
-
<p>This code is free to use under the terms of the Creative Commons <span class="caps">GNU GPL</span>.</p>
|
85
|
+
<p>This code is free to use under the terms of the <a href="http://creativecommons.org/licenses/GPL/2.0/">Creative Commons <span class="caps">GNU GPL</span></a>.</p>
|
86
86
|
|
87
87
|
|
88
88
|
<h2>Contact</h2>
|
@@ -90,7 +90,7 @@ Rfeedfinder.feeds('scripting.com')
|
|
90
90
|
|
91
91
|
<p>Comments are welcome. Send an email to <a href="mailto:alx.girard@gmail.com">Alexandre Girard</a>.</p>
|
92
92
|
<p class="coda">
|
93
|
-
<a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>,
|
93
|
+
<a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 27th February 2008<br>
|
94
94
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
95
95
|
</p>
|
96
96
|
</div>
|
data/website/index.txt
CHANGED
@@ -37,7 +37,7 @@ The trunk repository is <code>svn://rubyforge.org/var/svn/rfeedfinder/trunk</cod
|
|
37
37
|
|
38
38
|
h2. License
|
39
39
|
|
40
|
-
This code is free to use under the terms of the Creative Commons GNU GPL.
|
40
|
+
This code is free to use under the terms of the "Creative Commons GNU GPL":http://creativecommons.org/licenses/GPL/2.0/.
|
41
41
|
|
42
42
|
h2. Contact
|
43
43
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rfeedfinder
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.9.
|
7
|
-
date:
|
6
|
+
version: 0.9.12
|
7
|
+
date: 2008-04-03 00:00:00 +02:00
|
8
8
|
summary: rFeedFinder uses RSS autodiscovery, Atom autodiscovery, spidering, URL correction, and Web service queries -- whatever it takes -- to find the feed.
|
9
9
|
require_paths:
|
10
10
|
- lib
|