rfeedfinder 0.9.11 → 0.9.12

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.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.9.12 2008-03-04
2
+
3
+ * Correct nytimes.com bug, thanks Sebastian
4
+
1
5
  == 0.9.11 2007-10-29
2
6
 
3
7
  * Update license
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
@@ -2,7 +2,7 @@ module Rfeedfinder #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 9
5
- TINY = 11
5
+ TINY = 12
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/test/test_helper.rb CHANGED
@@ -7,4 +7,5 @@ def feed_finder(host_url, feed_url = "")
7
7
  assert_not_nil feed
8
8
  assert_not_equal "", feed
9
9
  assert_equal(feed_url, feed) if feed_url != "" # test only if feed_url
10
+ return feed
10
11
  end
@@ -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&amp;feed=RSS0.91&amp;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.11</a>
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>, 29th October 2007<br>
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.11
7
- date: 2007-10-29 00:00:00 +01:00
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