Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-02-2014, 09:09 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
cosmo cleaned up

cosmo recipe cleaned up

Spoiler:
Code:
import re
class AdvancedUserRecipe1390635673(BasicNewsRecipe):
    title          = u'Cosmopolitan UK'
    description = 'Womens Fashion, beauty and Gossip for women from COSMOPOLITAN -UK'

    __author__ = 'Dave Asbury'
   # 2/2/14
    oldest_article = 28
    max_articles_per_feed = 10
    compress_news_images = True
    compress_news_images_max_size = 20
    auto_cleanup_keep = '//div[@class="articleHeading"]'
    auto_cleanup = True
    ignore_duplicate_articles = {'title', 'url'}
    no_stylesheets        = True
    masthead_url = 'http://www.cosmopolitan.co.uk//cm/cosmopolitanuk/site_images/site_logo.gif'
    cover_url ='http://www.natmagnewsletters.co.uk/CIRCULES/CosmoXXLCover.jpg'
    #kovids code
    def preprocess_raw_html(self, raw_html, url):
         for pat, f in [
             (re.compile(r':: [\w].+</title>', re.DOTALL), lambda m: '</title>'),
 
         ]:
             raw_html = pat.sub(f, raw_html)
         return raw_html
    
    feeds          = [
        (u'Love & Sex', u'http://www.cosmopolitan.co.uk/love-sex/rss/'), (u'Men', u'http://cosmopolitan.co.uk/men/rss/'), (u'Fashion', u'http://cosmopolitan.co.uk/fashion/rss/'), (u'Hair & Beauty', u'http://cosmopolitan.co.uk/beauty-hair/rss/'), (u'LifeStyle', u'http://cosmopolitan.co.uk/lifestyle/rss/'), (u'Cosmo On Campus', u'http://cosmopolitan.co.uk/campus/rss/'), (u'Celebrity Gossip', u'http://cosmopolitan.co.uk/celebrity-gossip/rss/')]
scissors is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Just cleaned up my Amazon library pagansoul General Discussions 32 10-16-2011 12:54 PM
Nilox Cosmo PocketΒook 2.0 eAnagnostis More E-Book Readers 1 11-23-2010 08:26 AM
Jason Cosmo fantasy series by Dan McGirt DanMcGirt Self-Promotions by Authors and Publishers 4 10-01-2010 12:12 PM
LoTR Trilogy cleaned up? Mrgauth Reading Recommendations 12 09-26-2010 07:28 PM
It's about time they cleaned up their act... MJK2111 Lounge 24 09-16-2010 03:27 PM


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


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