Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15773 > unrolled thread

Re: Using Mathematica to Grab RSS Feeds

Started byGregory Lypny <gregory.lypny@videotron.ca>
First post2011-02-10 10:23 +0000
Last post2011-02-10 10:23 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Using Mathematica to Grab RSS Feeds Gregory Lypny <gregory.lypny@videotron.ca> - 2011-02-10 10:23 +0000

#15773 — Re: Using Mathematica to Grab RSS Feeds

FromGregory Lypny <gregory.lypny@videotron.ca>
Date2011-02-10 10:23 +0000
SubjectRe: Using Mathematica to Grab RSS Feeds
Message-ID<ij0ebv$9fk$1@smc.vnet.net>
Hello Hans,

Thank you for the tip.  The NotebookObject option is neat.  I think I can work with this to figure out how to convert the feed into an array with elements Date, Title, Headline, Story Contents, etc.


Regards,

Gregory


On Wed, Feb 9, 2011, at 6:11 AM, Hans Michel wrote:

> Please note that if the rss feed is version 2.01 or earlier Mathematica
> version 7 has been supporting direct Import and conversion to NoteBook
> bject.
> 
> The following will open a new Notebook with the ability to refresh
> Import["http://feeds.bbci.co.uk/news/world/europe/rss.xml", {"RSS", 
>  "NotebookObject"}]
> 
> The following will return a Notebook symbol with Cell data
> Import["http://feeds.bbci.co.uk/news/world/europe/rss.xml", "RSS" ]
> At which point the pattern matching would not be based on "XML" but
> Mathematica Notebook structure.
> 
> 
> See more information on ref/format/RSS
> 
> Hans
> 
> -----Original Message-----
> From: Gregory Lypny [mailto:gregory.lypny@videotron.ca] 
> Sent: Wednesday, February 09, 2011 1:09 AM
> To: mathgroup@smc.vnet.net
> Subject:  Re: Using Mathematica to Grab RSS Feeds
> 
> Hi Sjoerd,
> 
> Thank you for your tips!  This is exactly the type of thing that I need 
> to get me going.  I figured Import was the thing to use, but I'm still 
> a bit green on specifying patterns for Cases.  Your example here will 
> give me a good start.
> 
> Thanks again,
> 
> Gregory Lypny
> 
> 
> On Tue, Feb 8, 2011, at 7:56 AM, Sjoerd C. de Vries wrote:
> 
>> Never done this, but Import may be your tool of  choice:
>> 
>> xmlIn = Import["http://feeds.bbci.co.uk/news/world/europe/rss.xml",
>> "XML" ]
>> 
>> get descriptions:
>> 
>> Cases[xmlIn,
>> XMLElement["description", {}, {desc___}] -> desc, Infinity]
>> 
>> get links:
>> 
>> Cases[xmlIn, XMLElement["link", {}, {desc___}] -> desc, Infinity]
>> 
>> etc.
>> 
>> Cheers -- Sjoerd
>> 
>> On Feb 8, 11:03 am, Gregory Lypny <gregory.ly...@videotron.ca> wrote:
>>> Hello everyone,
>>> 
>>> Wondering if anyone has used Mathematica to grab RSS feeds and curate
> them in some sort of a database for later analysis.  Any tips on how this
> might be done?
>>> 
>>> Regards,
>>> 
>>> Gregory Lypny
>> 
> 
> 

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web