View Single Post
Old 05-23-2010, 06:13 PM   #1974
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
Improved Freakonomics Blog - Now with images!

Here's an updated Freakonomics Blog recipe. The built-in uses the print link, which, unfortunately, doesn't include images. This one has the images.

Code:
#!/usr/bin/env  python
__license__   = 'GPL v3'
__copyright__ = '2009, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'

from calibre.web.feeds.news import BasicNewsRecipe

class Freakonomics(BasicNewsRecipe):
    
    title = 'Freakonomics Blog'
    description = 'The Hidden side of everything'
    __author__ = 'Starson17'
    language = 'en'
    cover_url           = 'http://ilkerugur.files.wordpress.com/2009/04/freakonomics.jpg'
    
    feeds = [('Blog', 'http://feeds.feedburner.com/freakonomicsblog')]
    
    keep_only_tags     = [dict(name='div', attrs={'id':'header'}),
                          dict(name='h1'),
                          dict(name='h2'),
                          dict(name='div', attrs={'class':'entry-content'}),
                          ]
    extra_css = '''
                    h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
                    h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
                    p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
                    body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
		'''
Starson17 is offline