12-09-2010, 05:46 PM | #1 |
Enthusiast
Posts: 41
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G/Wifi
|
Combined Feeds
So I've been playing with yahoo pipes to merge multiple feeds into one but can't seem to get that to work consistently with calibre recipes.
I'd like to pull data from multiple sites and have it all under one section on the section list. For example, grab the latest news from fox, cnn, etc. and put it under the "latest news" section (as opposed to 2 different sections). And then do the same thing with a few technology sites and put that under a technology section. Etc, etc... I've tried adding commas and semicolons between the urls like this: Spoiler:
Didn't expect that to work. I also dug through the code for the NY Times Headlines because it appears to do what I want but couldn't connect the dots. If it's possible, throw some code my way please. |
12-10-2010, 09:52 AM | #2 |
Enthusiast
Posts: 41
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G/Wifi
|
So I'm thinking I could use parse_feeds to loop through all articles looking for the feed title and move them (append and delete) to the other title.
Something like this (modified form the reusable code section) Spoiler:
I'll try this when I get home today and tweak it a bit more. Any thoughts? |
Advert | |
|
12-10-2010, 10:15 AM | #3 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
The problem with trying to get the "latest news from fox, cnn, etc" all into one recipe usually has nothing to do with sorting the articles (you've already found the tools in the reusable code section that can do that.) It has to do with the fact that 1) different sites organize the article pages differently, so you need to process them with different code to extract the content you want and remove the unwanted junk, and 2) the latest news from multiple sites tends to be the same "latest news"
|
12-10-2010, 11:06 AM | #4 | |
Enthusiast
Posts: 41
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G/Wifi
|
Quote:
Is there a way to process the feeds individually (within a loop maybe) or will the redundant code goof things up? |
|
12-10-2010, 11:53 AM | #5 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
What do you mean by "process the feeds individually "? The code samples describe how feed parsing is done. There are two distinct ways that feeds are parsed, automatically for RSS feeds and parse_feeds. The code samples show how to mix, match and sort the articles from the parsed feed list if you need to do that.
|
Advert | |
|
12-10-2010, 11:59 AM | #6 |
Enthusiast
Posts: 41
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G/Wifi
|
Ok, that tells me what I need to know; thanks. Just wanted to confirm that what I wanted to do was feasible before I spent half the day coding. I've somehow avoided python during my undergrad and grad work but the API documentation looks pretty good. Here's goes nothing...
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Alien Murders by Stephen Goldin--a science fiction murder mystery | sgoldin | Self-Promotions by Authors and Publishers | 5 | 07-04-2013 05:22 PM |
periodically email combined RSS feeds to Kindle account? | bspooky | Amazon Kindle | 12 | 11-05-2010 12:33 AM |
PRS-300 RSS Feeds | denmarks | Sony Reader | 1 | 10-06-2009 01:41 PM |
Lots of files combined into one - most efficient way? | Rasczak | Amazon Kindle | 7 | 01-04-2009 02:03 PM |
RSS feeds | ichor | iRex | 1 | 03-01-2008 11:30 PM |