duanji5116 2012-08-22 20:33
浏览 17
已采纳

使用SimplePie显示完整的文章

I used SimplePie to display RSS feed from a basketball website. The article titles show up but I want the entire article to display. I tried changing

echo $item->get_description() to echo $item->get_content()

it still only shows the little exert. I know it's possible because:

http://fulltextrssfeed.com/

this website displays the entire article just like how I want it. Any suggestions how to do this with SimplePie?

  • 写回答

2条回答 默认 最新

  • doufang8965 2012-08-22 20:59
    关注

    If an RSS feed does not contain the article, no matter which parser you use you will not be able to extract something from nothing.

    However, what I tend to do is use Diffbot to parse articles. They have an easy-to-use API and as far as I know is the best free article parser.

    So, you would get each URL and make a batch request to Diffbot which will return a large JSON array, which you can then extract the full article from.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Llama如何调用shell或者Python
  • ¥20 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi