在Tiny Tiny Rss Reader中用af_feedmod插件获取全文

  • Posted on
  • by

许多新闻网站支持rss订阅,但是只输出标题和摘要,这限制了rss阅读器的体验。为了获得全文输出的源,可采用yahoo pipe,也可以使用其它网站提供的类似服务。

如果采用tt rss reader自建阅读器,还有一种选择:用af_feedmod插件获取全文。af_feedmod的源文件托管在github:ttrss_plugin-af_feedmod。插件的安装过程可以参考说明文档。

在安装好插件之后,tt rss reader的控制面板会增加一个FeedMod标签页。af_feedmod采用xpath语言对rss源的网址进行匹配,然后抓取网址对应的网页获取指定的网页元素。

af_feedmod配置文件的设置在项目页面已经有解释,尽管不是很复杂但也需要学习。为了便于使用,本文列出路透社中文、BBC中文、金融时报、南华早报、华尔街中文及日本网中文的配置文件,仅供参考。相应的配置文件可能会随所订阅源的网址及网页元素变化失效。

{
"reuters0N0Carticle": {
"type": "xpath",
"xpath": "div[@id='resizeableText']",
"forcecharset": "utf-8"
},
"www.bbc.co.uk/zhongwen/simp": {
"type": "xpath",
"xpath": "div[@class='story-body
inner']",
"force
charset": "utf-8"
},
"ftchinese": {
"type": "xpath",
"xpath": "div[@class='content']/div",
"forcecharset": "utf-8"
},
"nanzao.com": {
"type": "xpath",
"xpath": "div[contains(@class, 'field-name-body')]",
"force
charset": "utf-8"
},
"0Lcn0Bwsj0N0Cgb0C": {
"type": "xpath",
"xpath": "div[@id='bodytext']/div[@id='A']",
"cleanup": "script",
"forcecharset": "utf-8"
},
"nippon.com/cn": {
"type": "xpath",
"xpath": "div[@id='detail
contents']",
"cleanup": "div[@id= 'anyShare' ]",
"force_charset": "utf-8"
}
}

各主要境外媒体的源:

纽约时报中文网:http://cn.nytimes.com/rss.html

路透社中文:http://cn.reuters.feedsportal.com/chinaNews

BBC中文:http://www.bbc.co.uk/zhongwen/simp/chinese_news/index.xml

金融时报:http://www.ftchinese.com/rss/feed

南华早报:http://www.nanzao.com/sc/rss/all/rss.xml

华尔街中文:http://cn.wsj.com/gb/rssall.xml

日本网中文:http://www.nippon.com/cn/feed/