Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/475.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 当将网站URL输入搜索框(而不是提要URL)时,feedly之类的服务如何从网站获取rss提要_Javascript_Jquery_Json_Rss - Fatal编程技术网

Javascript 当将网站URL输入搜索框(而不是提要URL)时,feedly之类的服务如何从网站获取rss提要

Javascript 当将网站URL输入搜索框(而不是提要URL)时,feedly之类的服务如何从网站获取rss提要,javascript,jquery,json,rss,Javascript,Jquery,Json,Rss,这可能是一个愚蠢的问题,不是一个完全与编程相关的问题,但请容忍我,因为我正在努力学习 如何通过在搜索框中输入网站URL从网站检索提要/新闻 例如,我在搜索字段中输入了所传递的AJAX调用/查询字符串 它返回一个JSON作为响应 {"results":[{"deliciousTags":["Design","inspiration","Diseño","Web Design",

这可能是一个愚蠢的问题,不是一个完全与编程相关的问题,但请容忍我,因为我正在努力学习

如何通过在搜索框中输入网站URL从网站检索提要/新闻

例如,我在搜索字段中输入了所传递的AJAX调用/查询字符串

它返回一个JSON作为响应

{"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!"}]}
我所理解的

1) feedly根据键
deliciousTags
,生成#标记 2) feedly根据关键字
得分
,以自上而下的顺序排列站点上可用的不同提要/新闻URL

我不明白的事

1) feedly是如何通过只输入网站URL来获取新闻提要/rss URL的(示例:
“feedId”:“feed”/http://feeds.feedburner.com/inspirationfeed/BTLD“

2) 对于这样的事情,需要编写什么类型的web服务。是否需要服务器端脚本来深入搜索相关网站并检索提要URL?是否可以使用JQuery/Javascript在客户端本身获取提要URL


再次感谢您抽出时间阅读此问题。

在html页面的开头有一个链接,指向带有rss/atom提要的站点,如下所示:

<link rel="alternate" type="application/atom+xml" title="Feed for question &#39;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&#39;" href="/feeds/question/19345075">

这是本问题第页的来源

Feedly或类似的服务在该页面(不是主机)的html中搜索并找到此链接标记(使用rel,type):
(还有更多)

还有一些设置提要URL的例程

  • http:///rss
  • http:///feed
  • http:///atom
  • http:///.xml
如果没有找到,那么那里什么都没有

这可以在服务器端和客户端完成,但在服务器端有更多的好处,比如在解析页面html和测试例程之前进行数据库搜索

Firefox默认有一个获取页面提要的选项,以前版本的chrome也有这样的功能,但google(和google way)将其删除。(这是浏览器端,由用户控制和拥有,网站无法使用!但你可以找到他们实现这种方法的方式)