08-03-2011, 07:48 AM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2011
Device: kindle 3
|
Help with sections
I would like to know how to make different sections from one single rss. How do I do this?
I am trying to make a recipe forhttp://www.cartacapital.com.br/ There is a single rss which is: http://www.cartacapital.com.br/feed/rss I found two different ways to view the section, one from the url - for example for internacional:- for política:or in the code itself you can find it in <p id="BlogDate"> Any help? |
08-03-2011, 09:59 AM | #2 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I don't understand what you are asking. If you want to break up a single RSS feed into multiple virtual feeds, see here:
https://www.mobileread.com/forums/sho...45&postcount=2 |
Advert | |
|
08-03-2011, 11:56 AM | #3 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2011
Device: kindle 3
|
Quote:
There is only one rss under which all the articles from all the sections are listed, therefore in that rss I can find articles from the economy section mixed with articles from the politics section. I would like to have a different section for each topic. I have taken a look at that post, however I cannot make it work, I must be doing something wrong or not understanding the process. Thanks. |
|
08-03-2011, 12:23 PM | #4 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
2) find a word that appears in the title of each article that you want to use to grab that article out of the main feed (like "POLITICS") (if there is no such word, then you'll need to use something in the description or the link address - see some of my code examples in the code sticky about removing VIDEO links to see other characteristics you can key on) 3) copy in all of the code from that post, but change two lines: Code:
if curarticle.title.upper().find('RECIPE') >= 0: and, optionally, change the name of the new virtual feed in this line: Code:
pfeed.title = 'Recipes' |
|
08-03-2011, 01:11 PM | #5 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2011
Device: kindle 3
|
Thanks 4 r help!
Found an alternative to build the recipe. Here it goes: Code:
class AdvancedUserRecipe1312361378(BasicNewsRecipe): title = u'Carta capital' oldest_article = 9 max_articles_per_feed = 100 feeds = [(u'Politica', u'http://www.cartacapital.com.br/category/politica/feed') ,(u'Economia', u'http://www.cartacapital.com.br/category/economia/feed') ,(u'Cultura', u'http://www.cartacapital.com.br/category/cultura/feed') ,(u'Internacional', u'http://www.cartacapital.com.br/category/internacional/feed') ,(u'Saude', u'http://www.cartacapital.com.br/category/saude/feed') ,(u'Sociedade', u'http://www.cartacapital.com.br/category/sociedade/feed') ,(u'Tecnologia', u'http://www.cartacapital.com.br/category/tecnologia/feed') ,(u'Carta na escola', u'http://www.cartacapital.com.br/category/carta-na-escola/feed') ,(u'Carta fundamental', u'http://www.cartacapital.com.br/category/carta-fundamental/feed') ,(u'Carta verde', u'http://www.cartacapital.com.br/category/carta-verde/feed') ] def print_version(self, url): return url + '/print' |
Advert | |
|
08-03-2011, 02:31 PM | #6 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
08-04-2011, 04:29 AM | #7 |
Junior Member
Posts: 8
Karma: 10
Join Date: Jul 2011
Device: kindle 3
|
Still trying to do that. However I found separate feeds on the source code of the site, so until I can manage to make it work in that way, this would do the trick. I will post the code with how far I got.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to break up into sections ??? | katielady | Sigil | 14 | 02-18-2011 06:01 PM |
New Forum Sections | gvtexas | Announcements | 1 | 06-09-2003 10:05 AM |