View Single Post
Old 06-18-2011, 07:43 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: 241
Karma: 1001369
Join Date: Sep 2010
Device: prs300, kindle keyboard 3g
Recipe: Out and About : Camping and Caravan - News and Reviews

******* WARNING***********

I've just found out the epub created, which displays fine in calibre, crashes my prs300. If I convert to LRF that's fine.
I've looked at the html in the epub and it looks basic enough- maybe someone can shed some light?

**************************

Code:
import time, re
class AdvancedUserRecipe1306061239(BasicNewsRecipe):
    title          = u'Out and about live'
    description = 'Camping and Caravan  - News and Reviews'

    author = 'Dave Asbury'
    
    cover_url= 'http://www.outandaboutlive.co.uk/img/template/footer/illustration_3.jpg'
    masthead_url  = 'http://www.outandaboutlive.co.uk/img/template/cloud_logo.gif'

    oldest_article = 56
    max_articles_per_feed = 100
    remove_empty_feeds = True
    remove_javascript     = True
    no_stylesheets = True

    preprocess_regexps = [
	(re.compile(r'Other News'), lambda h2 : ''),
	(re.compile(r'Magazines'), lambda h4 : '')
	                ]
    keep_only_tags = [
	dict(attrs={'class':['Content']})
	          ]  
    

    remove_tags = [
	  dict(attrs={'class' : ['ItemSummary','Buttons','jcarousel-skin-oal_magselector']})
	  #,dict(name='h4', attrs={'Magazines'})      
  ]
      
    remove_attributes = ['Other News']

    feeds          = [(u'Camping News', u'http://feeds.feedburner.com/OAL/News/Camping'),
	      (u'Camping Features', u'http://feeds.feedburner.com/OAL/Features/Camping'),
	      (u'Camping Reviews',u'http://feeds.feedburner.com/OAL/Reviews/Camping'),
	      (u'Caravan News',u'http://feeds.feedburner.com/OAL/News/Caravans'),
	       (u'Caravan Features',u'http://feeds.feedburner.com/OAL/Features/Caravans'),
	       (u'Caravan Reviews',u'http://feeds.feedburner.com/OAL/Reviews/Caravans')
  ]

Last edited by scissors; 06-18-2011 at 08:11 AM.
scissors is offline   Reply With Quote