Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 07-12-2011, 12:44 AM   #1
Bortolotto
Member
Bortolotto began at the beginning.
 
Bortolotto's Avatar
 
Posts: 15
Karma: 14
Join Date: Jun 2011
Location: Brazil
Device: Kindle
Thumbs up Recipe for VioMundo and Tijolaço (Brazilian Blogs)

Hi Buddies!

These recipes are from politics and economy blogs.

Tijolaço - http://www.tijolaco.com/
VioMundo - http://www.viomundo.com.br/

Tijolaço:
Spoiler:
Code:
from calibre.web.feeds.recipes import BasicNewsRecipe

class Tijolaco(BasicNewsRecipe):
    title                  = u'Tijolaco.com'
    __author__             = u'Diniz Bortolotto'
    description            = u'Posts do Blog Tijola\xe7o.com'
    oldest_article         = 7
    max_articles_per_feed  = 50
    encoding               = 'utf8'
    publisher              = u'Brizola Neto'
    category               = 'politics, Brazil'
    language               = 'pt_BR'
    publication_type       = 'politics portal'
    use_embedded_content   = False
    no_stylesheets         = True
    remove_javascript      = True

    feeds                  = [(u'Blog Tijola\xe7o.com', u'http://feeds.feedburner.com/Tijolacoblog')]

    reverse_article_order  = True

    keep_only_tags         = [dict(name='div', attrs={'class':'post'})]

    remove_tags            = [dict(name='span', attrs={'class':'com'})]


VioMundo:
Spoiler:
Code:
import re

class VioMundo(BasicNewsRecipe):
    title                  = 'Blog VioMundo'
    __author__             = 'Diniz Bortolotto'
    description            = 'Posts do Blog VioMundo'
    publisher              = 'Luiz Carlos Azenha'
    oldest_article         = 5
    max_articles_per_feed  = 20
    category               = 'news, politics, Brazil'
    language               = 'pt_BR'
    publication_type       = 'news and politics portal'
    use_embedded_content   = False
    no_stylesheets         = True
    remove_javascript      = True

    feeds                  = [(u'Blog VioMundo', u'http://www.viomundo.com.br/feed')]

    reverse_article_order  = True

    def print_version(self, url):
        return url + '/print/'

    remove_tags_after      = dict(id='BlogContent')

    preprocess_regexps     = [
                              (re.compile(r'\|\ <u>.*</p>'),
                              lambda match: '</p>')
                             ]
Attached Files
File Type: txt Tijolaco.txt (917 Bytes, 246 views)
File Type: txt VioMundo.txt (971 Bytes, 261 views)
Bortolotto is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two new recipes in Brazilian Portuguese Bortolotto Recipes 0 07-07-2011 09:47 PM
Recipe request for security blogs rherson Recipes 5 04-04-2011 06:16 PM
fetch news from on brazilian newspaper gustavoleo Recipes 0 11-21-2010 04:04 PM
Brazilian e-book publishers available? pedgarcia News 0 09-30-2009 12:00 PM
Brazilian Ebook Reader voidIndigo News 13 08-07-2009 03:38 AM


All times are GMT -4. The time now is 11:14 AM.


MobileRead.com is a privately owned, operated and funded community.