Reputation: 2914
This may be a dumb question , not a completely programming related question but bear with me as I am trying to learn.
How does FEEDLY retrive the feeds / news from a website just by entering the website URL into the search box.
For instance , I entered http://www.inspirationfeed.com into the search field and the AJAX call / query string which was passed was
http://cloud.feedly.com/v3/search/feeds?q=http%3A%2F%2Finspirationfeed.com%2F&n=20&ck=1381664838936
It returned a JSON as the response
{"results":[{"deliciousTags":["Design","inspiration","Diseño","Web Design","webdesign","graphic design"],"lastUpdated":1381561980000,"score":27531.265625,"website":"http://inspirationfeed.com","title":"inspirationfeed.com","subscribers":1772,"language":"en","velocity":16.3,"feedId":"feed/http://feeds.feedburner.com/inspirationfeed/BTLD","description":"be inspired!"},{"deliciousTags":["DESIGN","Inspiration"],"lastUpdated":1381474380000,"score":48.0,"website":"http://inspirationfeed.com","title":"inspirationfeed.com » Inspiration","subscribers":48,"language":"en","velocity":4.7,"feedId":"feed/http://inspirationfeed.com/category/inspiration/feed/","description":"be inspired!"},{"deliciousTags":["design"],"lastUpdated":1381479900000,"score":294.7439270019531,"website":"http://inspirationfeed.com","title":"inspirationfeed.com » Articles","subscribers":27,"language":"en","velocity":11.7,"feedId":"feed/http://inspirationfeed.com/category/articles/feed/","description":"be inspired!"},{"deliciousTags":["Photography"],"lastUpdated":1381129620000,"score":17.0,"website":"http://inspirationfeed.com","title":"inspirationfeed.com » Photography","subscribers":17,"language":"en","velocity":0.7,"feedId":"feed/http://inspirationfeed.com/category/photography/feed/","description":"be inspired!"},{"deliciousTags":["Little Bit of Everything-Amatuer"],"lastUpdated":1381396020000,"score":109.16442108154297,"website":"http://inspirationfeed.com","title":"inspirationfeed.com » Blogging","subscribers":10,"language":"en","velocity":0.5,"feedId":"feed/http://inspirationfeed.com/category/articles/blogging/feed/","description":"be inspired!"}]}
WHAT I UNDERSTOOD
1)Based on the key deliciousTags
, feedly generates the # tags
2)Based on the key score
, feedly arranges the different feeds / news URLS available from the site in a top down order
WHAT I DIDNOT UNDERSTAND
1)How does feedly get the news feed / rss URL by just entering the website URL (EXAMPLE : "feedId":"feed/http://feeds.feedburner.com/inspirationfeed/BTLD"
)
2)What type of a web service needs to be written for such a thing. Does it need server side scripting to do a deep search of the website in question and retrieve the feed URLS ? Can the feed URLS be fetched on the client side itself using JQuery / Javascript ?
Once again , thank you for taking time to read the question.
Upvotes: 2
Views: 2464
Reputation: 867
In head of page html there's a link for sites with rss/atom feed, something like this :
<link rel="alternate" type="application/atom+xml" title="Feed for question 'how does a service like feedly obtain the rss feeds from a website when the website URL is entered into the search box(not the feed url'" href="/feeds/question/19345075">
this is in source of page of this question
Feedly or services like that search in html of that page (not host) and find this link tag (with rel,type): <link rel="alternate" type="application/atom+xml" title="awd" href="/feedUrl">
or <link rel="alternate" type="application/rss+xml" title="awd" href="/feedUrl">
(there's more of this)
and also there's some routines in setting up feed urls,
http://<url>/rss
http://<url>/feed
http://<url>/atom
http://<url>/<page>.xml
If none found then there is nothing there!
It's can be done in both server-side and client-side, but in server-side there's more benefits like database searching before parsing page html and testing routines.
Firefox by default has an option to get page feed, previous versions of chrome has such functionality but it's removed by google (and google way). (that's browser-side, controlled and owned by user can't be used by sites! but you can find the way they implemented that approach)
Upvotes: 7