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 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 arduino控制ps2手柄一直报错
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 求chat4.0解答一道线性规划题,用lingo编程运行,第一问要求写出数学模型和lingo语言编程模型,第二问第三问解答就行,我的ddl要到了谁来求了
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题