Closed (fixed)
Project:
FeedAPI
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Aug 2007 at 10:15 UTC
Updated:
9 Oct 2007 at 21:31 UTC
It's possible to write a parser which is able to detect the feed URL (if present) from a standard web URL. For example: if the user enters www.drupal.org, the parser find http://drupal.org/node/feed, and parse this instead of the originally entered URL.
Comments
Comment #1
buddaaka parsing of auto discovery urls, such as
<link rel="alternate" type="application/rss+xml" title="drupal.org RSS" href="http://drupal.org/node/feed" />SimplePie library has some existing code to take care of this, line 10092 function autodiscovery()
Comment #2
aron novakYeah, but SimplePie is not the only parser. I would like to see coherent feature list not depending on which parser is used.
I'm not sure that the basic FeedAPI package have to contain this feature or not. It is a really comfortable feature btw.
Comment #3
buddaI was actually meaning to take code from simplepie and implement it in to the main feedapi system.
Comment #4
aron novakI'm curious if it's possible to implement auto-detecting in FeedAPI smaller size than simplepie's proper function (and their dependant function) does this job.
Well, i looked into SimplePie's code. autodiscovery functions needs the whole SimplePie_Misc object for example.
I prefer a more compact solution for this. For example here (http://keithdevens.com/weblog/archive/2002/Jun/03/RSSAuto-DiscoveryPHP) the guy solve this in one function and in 62 lines.
budda, or do you have specific ideas to get the autodiscovery function from SimplePie elegantly without SimplePie's other part?
Comment #5
lopolencastredealmeida commentedI would propose that:
If SimplePie is in use its function should be used
else the "default" one based on Keith Devens should be used
Another option would be to create a hook that could be adapted by developers to wrap their own autodiscovery function
Comment #6
buddaHow many ways is there to really discover a feed url? why not just use the Keith Devens one to cover all bases?
Comment #7
buddaI just added a couple of feeds on a test site, the feed urls were just the actual site url. both were parsed and the feed items extracted fine -- so does this mean autodiscovery is already implemented somewhere??
Comment #8
buddaUPDATE: This is probably already working because SimplePie was my parser and that checks the feed URL during the init() call from parser_simplepie.module
So maybe stick Keith Devens code in to the other parser module -
_parser_common_syndication_download()seems like a suitable place?Comment #9
aron novakI read the RSS Autodiscovery specification (http://www.rssboard.org/rss-autodiscovery) and seems that Keith Devens code ignores
<base href="http://baseurl/path//">.I'm going to write another way (maybe it's possible to do easier? Not sure now) to get RSS links, but with using
<base>is present.Comment #10
aron novakI added the RSS Autodiscovery capability to parser_common_syndication . It's still experimental feature, please make sure if it works as expected.
Comment #11
(not verified) commented