douzhu6149 2014-12-29 13:23
浏览 41

克服从rss feed中检索内容

I was able to retrieve rss by adding a /feed for most of the wordpress blog. Like one of the example is https://www.techinasia.com/feed.

But I found that many blogs/sites when I added a /feed in the end it will show feedburner thingy. Like hongkiat.com/blog/feed it will become http://feeds2.feedburner.com/24thfloor. How to overcome this? develop 2 version of code?

  • 写回答

1条回答 默认 最新

  • dongxun3424 2014-12-30 04:53
    关注

    Unless you have access to the server that setup their /feed to use feedburner, you won't be able to change anything on your end.

    The concept is pretty simple:

    1. you have a /feed that gives you the feed of the website as expected

    2. you have a small setup in Apache (or equivalent HTTP server) to tell to redirect the user if he's not a feedburner server; so the feedburner can read the /feed data directly, anyone else can't.

    However, I don't see why you think this is a problem. The data you get is exactly the same. Only you get an intermediate 301 when retrieving the data using the original /feed path.

    There is same examples on this website on that's achieved (.htaccess or a PHP snippet):

    http://codex.wordpress.org/Using_FeedBurner

    If the test used by the server with the /feed only checks the User Agent name, then you could simulate being feedburner. But again, you will have much more chance to connect and read the data using feedburner (because that's owned by Google and they have the horse power to send you the content of the feed without an inch of a problem.)

    评论

报告相同问题?

悬赏问题

  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上