atom-feed

Retrieving raw XML for items with feedparser

落花浮王杯 提交于 2019-12-06 06:17:51
I'm trying to use feedparser to retrieve some specific information from feeds, but also retrieve the raw XML of each entry (ie. elements for RSS and for Atom), and I can't see how to do that. Obviously I could parse the XML by hand, but that's not very elegant, would require separate support for RSS and Atom, and I imagine it could fall out of sync with feedparser for ill-formed feeds. Is there a better way? Thanks! I'm the current developer of feedparser. Currently, one of the ways you can get that information is to monkeypatch feedparser._FeedParserMixin (or edit a local copy of feedparser

How to use GMail Atom feed to read GMail labels?

邮差的信 提交于 2019-12-06 03:44:37
I have read that I can use the gmail atom feed to get mails from "inbuilt" labels created by google. But when I try to get mails from the "read" label, using https://mail.google.com/mail/feed/atom/read I get zero emails returned. The same works if I use label:"read" in the search box. Any idea if my usage of the atom feed is correct or wrong? Your problem could be related with this: Please keep in mind that Gmail messages will appear in your aggregator only if there are unread messages in your inbox. Source: http://code.google.com/apis/gmail/docs/inbox_feed.html shawty I've been doing some

How to make the Mercurial (hgwebdir) rss/atom feed display the branch name

纵饮孤独 提交于 2019-12-05 18:27:48
I would like to configure our Mercurial server installation so the rss/atom feed will publish the branch name of the changeset, in addition to the standard fields (title, guid, description, author, pubDate). Installation locations differ, but on ubuntu you'll find the relevant file as /usr/share/mercurial/templates/atom/changelogentry.tmpl . It starts out looking like: <entry> <title>{desc|strip|firstline|strip|escape|nonempty}</title> <id>{urlbase}{url}#changeset-{node}</id> <link href="{urlbase}{url}rev/{node|short}"/> <author> <name>{author|person|escape}</name> <email>{author|email

How to Add CSS Reference to .NET SyndicationFeed?

喜欢而已 提交于 2019-12-05 17:53:22
I have created a simple SyndicationFeed with many SyndicationItems. Each SyndicationItem has HtmlContent. The HtmlContent is a table. This displays OK, but now I need a minimum of styling/padding on the table. I believe I need to add a stylesheet reference like <?xml-stylesheet type="text/css" href="http://you.com/rss.css" ?> But I do not see how to do this with the .NET 4.5 SyndicationFeed or Atom10FeedFormatter classes. Here is the (pseudo) code that is generated by a WCF service. var feed = new feed(......); var xqn = new XmlQualifiedName( "mysys" , "http://www.w3.org/2000/xmlns/" ); feed

What's the best library for parsing RSS/Atom in Perl?

戏子无情 提交于 2019-12-05 13:11:52
问题 I notice that XML::RSS::Parser hasn't been updated since 2005. Is this still the recommended library for parsing RSS or Atom? Is there a better one or a better way? 回答1: I'm not sure it's ever been the "recommended library". If I know which kind of feed I need to parse, I use XML::RSS or XML::Atom as appropriate, but if (as is more likely) I just know it's a web feed, I use XML::Feed. Adding an example of using XML::Feed as requested.. use XML::Feed; my $feed = XML::Feed->parse(\$string

2-legged OAuth and the Gmail atom feed

此生再无相见时 提交于 2019-12-05 05:29:17
问题 We're trying to get 2-legged OAuth to work with the Gmail atom feed. We're using the Java library contributed by John Kristian, Praveen Alavilli and Dirk Balfanz. [http://oauth.net/code/] instead of the GData library. We know we have the correct CONSUMER_KEY and CONSUMER_SECRET, etc. becuase it works with the Contacts feed (http://www.google.com/m8/feeds/contacts/default/full) and have no problems. However with Gmail atom feed it always returns: HTTP/1.1 401 Unauthorized Any ideas? Should we

Safely generating XML in Lua

冷暖自知 提交于 2019-12-05 04:58:34
问题 I'm writing a Lua application that generates an Atom feed. Right now, I'm generating XML "by hand" -- writing strings to files. This doesn't seem like the best way, although it may be. I am getting nervous about having the escaping exactly right. Has anyone done anything like this in Lua before? Should I stick with generating "by hand"? Or write a wrapper for an existing C library? (Perl, by comparison, seems to have a plethora of options.) 回答1: I've generated XML by hand too. I created an

How To Add A SyndicationElementExtension To A SyndicationItem

房东的猫 提交于 2019-12-05 04:40:22
Using the .NET System.ServiceModel.Syndication classes... I would like to add a new SyndicationElementExtension to a SyndicationItem that will export the following XML: <media:thumbnail url="http://www.foo.com/keyframe.jpg" width="75" height="50" time="12:05:01.123" /> Something along the lines of: syndicationItem.ElementExtensions.Add(new SyndicationElementExtension("thumbnail", "http://video.search.yahoo.com/mrss", ? How do you create a simple SyndicationElementExtension with a few attributes? Just to simplify for the next guy who comes along trying to figure this out, here's a working

Link to RSS/Atom feed, relative, doesn't work in Firefox

孤人 提交于 2019-12-05 03:05:26
I have a weird problem. I generate a HTML page, hosted let's say at http://www.x.com/stuff which contains <head> <link type="application/atom+xml" rel="alternate" href="/stuff/feed"/> .. </head> The result is: In IE7 all works well - you can click on the feed icon in the browser and the feed is displayed In Firefox, view source, click on the linked /stuff/feed and you see the source of the feed, so that works as expected In Firefox, view the page (not source), then click on the feed icon in the address bar, I get an error that it can't retrieve the URL feed://http//www.x.com/stuff/feed So the

Hypermedia with Jersey using Atom

a 夏天 提交于 2019-12-05 02:19:09
问题 Every book on REST uses <atom:link href="..." rel="..."> to define Hypermedia in RESTful apps; but Jersey ( with the use of JAXB ) do not seems to have this support. I've tried @XmlSchema in package-info.java as explained here; I've also tried extending NamespacePrefixMapper as explained there. But none works and output this at best: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <customer xmlns:ns2="http://www.w3.org/2005/Atom"> <first-name>Roland</first-name> <ns2:link href="