View Single Post
Old 01-28-2011, 09:39 AM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by miwie View Post
Unfortunately I get encoding errors with this recipe.

Code:
File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 380: invalid continuation byte
I tried ISO-8859-1, UTF-8, and cp1252 without any success.
The error is in his name. I suspect you changed the line
encoding = 'ISO-8859-1'
That affects the output and what it sees as the input feed, but the error is that the recipe itself has, "Hernández," instead of "Hernandez." There were some other indent errors for me.
Try this one:
Spoiler:
Code:
__license__   = 'GPL v3'
__author__    = 'Luis Hernandez'
__copyright__ = 'Luis Hernandez<tolyluis@gmail.com>'
description   = 'blog sobre leyes, p2p y copyright v1.0'

'''
http://www.filmica.com/david_bravo/
'''

class AdvancedUserRecipe1294946868(BasicNewsRecipe):
    title             = u'Blog de David Bravo'
    publisher      = u'Filmica'
    __author__  = 'Luis Hernandez'
    description   = 'blog sobre leyes, p2p y copyright'
    cover_url     = 'http://www.elpais.es/edigitales/image.php?foto=par/portada/1551.jpg'
    oldest_article = 365
    max_articles_per_feed = 100
    remove_javascript = True
    no_stylesheets        = True
    use_embedded_content  = False
    encoding              = 'ISO-8859-1'
    language              = 'es'
    timefmt        = '[%a, %d %b, %Y]'

    keep_only_tags     = [
                                    dict(name='div', attrs={'class':['blog','date','blogbody','comments-head','comments-body']})
                                   ,dict(name='span', attrs={'class':['comments-post']})
                                ]

    remove_tags_before = dict(name='div' , attrs={'id':['bitacoras']})
    remove_tags_after  = dict(name='div' , attrs={'id':['comments-body']})

    extra_css             = ' p{text-align: justify; font-size: 100%} body{ text-align: left; font-family: serif; font-size: 100% } h2{ font-family: sans-serif; font-size:75%; font-weight: 800; text-align: justify } h3{ font-family: sans-serif; font-size:150%; font-weight: 600; text-align: left } img{margin-bottom: 0.4em} '
  


    feeds          = [(u'Blog', u'http://www.filmica.com/david_bravo/index.rdf')]
Starson17 is offline   Reply With Quote