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 08-22-2013, 12:01 PM   #1
wendy5
Member
wendy5 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Aug 2013
Device: Kindle Keyboard
Consumerist recipe broken

For the last few weeks, Calibre only fetches the article titles from Consumerist but I can't read the articles. Is there a fix for this? Thank you.
wendy5 is offline   Reply With Quote
Old 08-23-2013, 02:35 AM   #2
Divingduck
Fanatic
Divingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolate
 
Posts: 511
Karma: 33884
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Feel free to use this update

Spoiler:
Code:
## Last Edit:  2013-08-23
## From:  Armin Geller
__license__   = 'GPL v3'
__copyright__ = '2010, NA'
'''
consumerist.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Consumerist(BasicNewsRecipe):
    title                 = 'Consumerist'
    __author__            = 'NA'
    description           = "Consumerist, Shoppers Bite Back."
    publisher             = 'consumerist.com'
    category              = 'news, consumer news, consumer rights'
    oldest_article        = 2
    max_articles_per_feed = 100
    no_stylesheets        = True
    encoding              = 'utf-8'
    use_embedded_content  = False
    language              = 'en'
    masthead_url          = 'http://consumermediallc.files.wordpress.com/2013/02/consumerist.png'# AGe 2013-08-23
    
    extra_css             = '''
                              body{font-family: "Lucida Grande",Helvetica,Arial,sans-serif}
                              img{margin-bottom: 1em}
                              h1{font-family :Arial,Helvetica,sans-serif; font-size:x-large}
                              h2{font-family :Arial,Helvetica,sans-serif; font-size:large}
                            '''
    conversion_options = {
                          'comment'   : description,
                          'tags'      : category,
                          'publisher' : publisher,
                          'language'  : language,
                          }

    remove_attributes  = ['width','height']

    keep_only_tags     = dict(name='div', attrs={'class':['hfeed',]}) # AGe 2013-08-23

    remove_tags        = [dict(name='div', attrs={'class':['navigation', # AGe 2013-08-23
                                         'wpcom-related-posts widget widget_related_posts', # AGe 2013-08-23
                                         'sharedaddy sd-like-enabled sd-sharing-enabled',]}), # AGe 2013-08-23
                          dict(name='div', attrs={'id':['comments',]}), # AGe 2013-08-23
                          ]

    feeds = [(u'Articles', u'http://consumerist.com/index.xml')]

    def preprocess_html(self, soup):
        return self.adeify_images(soup)
Attached Files
File Type: zip Consumerist_AGe.zip (971 Bytes, 20 views)
Divingduck is offline   Reply With Quote
Old 08-23-2013, 02:35 PM   #3
wendy5
Member
wendy5 began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Aug 2013
Device: Kindle Keyboard
Thanks!

Before I saw your post my download this morning (6 am EDT) was fine. Maybe the new recipe was already applied to Calibre? Anyway, thanks for taking the time to post that.
wendy5 is offline   Reply With Quote
Old 08-23-2013, 03:23 PM   #4
Divingduck
Fanatic
Divingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolateDivingduck is generous with chocolate
 
Posts: 511
Karma: 33884
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Yes, Kovid was fast in updating.
Divingduck 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
NEJM recipe broken PatStapleton Recipes 0 03-24-2012 06:41 PM
Bad Kobo support story on the Consumerist artifact Kobo Reader 6 01-05-2012 09:27 AM
Fleshbot Recipe broken? vogelap Recipes 2 09-20-2011 05:45 PM
xkcd recipe broken elementz Recipes 3 12-16-2010 06:27 PM
Recipe for The Week broken? gianfri Calibre 3 03-19-2010 08:05 PM


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


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