Viewing raw RSS feed?

Deadly 提交于 2020-01-02 04:37:06

问题


I use WordPress for several websites. I want to customize one of the RSS feeds and create a template for the outputted data but everytime I click on the feed link (myurl.com/feed) it takes me to a Google page to add it to my Google Reader. I use Google Reader and normally want everything else to default to that, but how can I override it this one time so I can see the raw xml/rss feed? Thanks.


回答1:


The best way to view raw RSS is with CURL over the command line. Browsers can alter the source (firefox in particular) when showing it to you so the best thing is to get it unfiltered from curl.




回答2:


A solution that doesn't require using different browsers:

In Firefox preferences, select Applications and search for "Web Feeds." Changing the action to "Preview in Firefox" allows Firefox to load the feed itself, instead of google reader. It has a "gussied up" display of the feed in the browser, but you can also view the source to see the actual text of the feed.




回答3:


You can use a difference broswer, though most browsers will apply an xsl stylesheet to raw feed data by detecting that its a feed using the http response content type header. I know that Google Chrome shows some kind of raw data for rss feeds though its not exactly pure xml.

You can Use Fiddler to see the response. Or use some other http sniffer tool.




回答4:


Change the browser settings for your feed initially - you can change it back afterwards. Once done...

View the RSS feed, it will show you a pretty version. Then view the source code. You'll see the raw feed. No different browsers, no CURL, no WGET.




回答5:


I used a combination of several different browsers to test how each RSS feed was displayed, then I customized my stylesheet based on the output.



来源:https://stackoverflow.com/questions/3364336/viewing-raw-rss-feed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!