rss

Getting deprecated error with Simplepie

大城市里の小女人 提交于 2019-12-18 09:01:09
问题 I have installed the latest Simplepie code (1.2.1) and I am using the demo code they provide: <?php require 'simplepie.inc'; $url = 'http://news.google.com/news?ned=us&topic=h&output=rss'; $feed = new SimplePie(); $feed->set_feed_url($url); $feed->init(); // default starting item $start = 0; // default number of items to display. 0 = all $length = 0; // if single item, set start to item number and length to 1 if(isset($_GET['item'])) { $start = $_GET['item']; $length = 1; } // set item link

Jsoup selector on RSS <link> tag returns empty string with .text() method

为君一笑 提交于 2019-12-18 08:58:08
问题 I'm using jsoup to parse an rss feed using java. I'm having problems getting a result when trying to select the first <link> element in the document. When I use title.text() I get an expected result with this code: Document doc = Jsoup.connect(BLOG_URL).get(); Element title = doc.select("rss channel title").first(); System.out.println(title.text()); // print the blog title... However, link.text() doesn't work the same way: Element link = doc.select("rss channel link").first(); System.out

How to get more feeds from RSS url?

穿精又带淫゛_ 提交于 2019-12-18 07:08:35
问题 Let's take for example the following rss-link: http://yourdailygerman.wordpress.com/feed/ As you can see, the RSS publishs only 1 item at a time. However, RSS Readers services like Feedly (and more), success to retrive more items: http://feedly.com/index.html#subscription%2Ffeed%2Fhttp%3A%2F%2Fyourdailygerman.wordpress.com%2Ffeed%2F I opened fiddler and I saw they have their own API (following "count" paramter as the items count to get), and I wonder - How they do that??? Thanks! 回答1: You can

Parsing an RSS feed in PHP with DOM

和自甴很熟 提交于 2019-12-18 07:06:57
问题 I'm trying to create an array of items from an RSS feed. I'm trying to test if it's working by echoing the title of the first item. I've been unsuccessful so far...I'd really appreciate any advice! I have two files, an 'index.php' and a 'test.php'. <!DOCTYPE html> <html> <head> <link rel = "stylesheet" type= "text/css" href = "style.css"> </head> <body> <h1>TEST SLIDER</h1> <p>First Title:<br> <?php include 'test.php'; $NPR_url = 'http://www.npr.org/rss/rss.php?id=1001'; $NPR = GetFeed($NPR

Feedparser.parse() 'SSL: CERTIFICATE_VERIFY_FAILED'

不羁的心 提交于 2019-12-18 05:56:29
问题 I'm having this SSL issue with feedparser parsing an HTTPS RSS feed, I don't really know what to do as I can't find any documentation on this error when it comes to feedparser: >>> import feedparser >>> feed = feedparser.parse(rss) >>> feed {'feed': {}, 'bozo': 1, 'bozo_exception': URLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)'),), 'entries': []} >>> feed["items"] [] >>> 回答1: Thanks you cmidi for the answer, which was to 'monkey patch' using

How to add line breaks in RSS feeds?

吃可爱长大的小学妹 提交于 2019-12-18 04:16:28
问题 I'm building my own custom RSS feed in PHP. I want the tag to contain line breaks to make the text more readable. However, I can't seem to figure out how to do it correctly. No matter what I try some RSS reader interprets it incorrectly. Is there some standard best way to add a line-break in and RSS 2.0 feed? I have tried "\n", which works in NetNewsWire on the Mac, but gets ignored by the built-in Safari browser's RSS reader. I have tried <br />, which works in the Safari RSS reader, but

How can I apply my CSS stylesheet to an RSS feed

大城市里の小女人 提交于 2019-12-18 03:17:36
问题 On my blog I use some CSS classes which are defined in my stylesheet, but in RSS readers those styles don't show up. I had been searching for class="whatever" and replacing with style="something: something;" . But this means whenever I modify my CSS I need to modify my RSS-generating code too, and it doesn't work for a tag which belongs to multiple classes (i.e. class="snapshot accent" ). Is there any way to point to my stylesheet from my feed? 回答1: The popular RSS readers WILL NOT bother

The best PHP lib/class to generate RSS/Atom [closed]

天涯浪子 提交于 2019-12-17 22:32:16
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I have to produce an RSS/Atom feed in various applications, and I want to know a good library or class which is able to produce both,

generate random number in RSS viewer webpart

我的未来我决定 提交于 2019-12-17 21:33:32
问题 I am using RSS viewer webpart with the following references: xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:rssaggwrt="http://schemas.microsoft.com/WebParts/v3/rssagg/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:rssFeed="urn:schemas-microsoft-com:sharepoint:RSSAggregatorWebPart" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rss1="http:/

rss parser in .net

你说的曾经没有我的故事 提交于 2019-12-17 18:58:12
问题 what's the best RSS reader for .net out there? most efficient and easy to use the ones i found are really complicated 回答1: http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx http://msdn.microsoft.com/en-us/magazine/cc135976.aspx .net has a class to parse ATOM and RSS feeds. Check out the links. What are you trying to do? Can you give more information? Alternatively You can just remove the "Feed version" from the XML file and parse it as a normal XML file using