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 06-09-2012, 11:24 AM   #1
scissors
Addict
scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.
 
Posts: 206
Karma: 1001369
Join Date: Sep 2010
Device: prs300, kindle keyboard 3g
Birmingham (UK) post updated 9/6/12

done away with autocleanup

Spoiler:
Code:
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1306097511(BasicNewsRecipe):
    title          = u'Birmingham post'
    description = 'Author D.Asbury. News for Birmingham UK'
    timefmt = ''
    __author__ = 'Dave Asbury'
    cover_url = 'http://1.bp.blogspot.com/_GwWyq5eGw9M/S9BHPHxW55I/AAAAAAAAB6Q/iGCWl0egGzg/s320/Birmingham+post+Lite+front.JPG'
    oldest_article = 2
    max_articles_per_feed = 12
    remove_empty_feeds = True
    remove_javascript     = True
    #auto_cleanup = True
    language = 'en_GB'


    masthead_url        = 'http://www.pressgazette.co.uk/Pictures/web/t/c/g/birmingham_post.jpg'


    keep_only_tags = [
    	    dict(name='h1',attrs={'id' : 'article-headline'}),
                        dict(attrs={'class':['article-meta-author','article-meta-date','article main','art-o art-align-center otm-1 ']}),
	    dict(name='div',attrs={'class' : 'article-image full'}),
	    dict(attrs={'clas' : 'art-o art-align-center otm-1 '}),
    	    dict(name='div',attrs={'class' : 'article main'}),
#dict(name='p')
    #dict(attrs={'id' : 'three-col'})
        ]
    remove_tags    = [
             # dict(name='div',attrs={'class' : 'span-33 last header-links'})

                               ]
    feeds          = [
        #(u'News',u'http://www.birminghampost.net/news/rss.xml'),
        (u'West Mids. News', u'http://www.birminghampost.net/news/west-midlands-news/rss.xml'),
        (u'UK News', u'http://www.birminghampost.net/news/uk-news/rss.xml'),
        (u'Sports',u'http://www.birminghampost.net/midlands-birmingham-sport/rss.xml'),
        (u'Bloggs & Comments',u'http://www.birminghampost.net/comment/rss.xml')

         ]
    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;}
		'''

Last edited by scissors; 06-09-2012 at 02:22 PM. Reason: extra css for fonts
scissors 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
Kindle 4 NT - Updated Screen-saver code, updated hack bmsleight Amazon Kindle 2 10-07-2012 04:57 PM
Recipe : Birmingham Post - uk scissors Recipes 0 12-22-2011 03:00 PM
Without Warning by John Birmingham GlenBarrington Reading Recommendations 6 09-03-2010 10:42 PM
updated metadata=updated file? jomaweb Calibre 13 01-28-2010 09:12 PM
Birmingham drops apostrophes HarryT Lounge 22 01-31-2009 07:44 AM


All times are GMT -4. The time now is 03:03 PM.


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