View Single Post
Old 09-20-2012, 06:03 PM   #4
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
I made a final version of this recipe. It includes now all pages of an article. In addition the recipe have a cover.

Spoiler:
Code:
__license__   = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'

'''
Fetch Anandtech.
'''

from calibre.web.feeds.news import BasicNewsRecipe


class anan(BasicNewsRecipe):

    title = 'Anandtech'
    description = 'comprehensive Hardware Tests'
    __author__ = 'Oliver Niesner' # 2012-09-20 AGE: update
    use_embedded_content   = False
    language = 'en'
    timefmt = ' [%d %b %Y]'
    oldest_article        = 7 # 2012-09-20 AGE: update
    max_articles_per_feed = 40
    no_stylesheets = True
    remove_javascript = True
    encoding = 'utf-8'

    cover_url = 'http://www.anandtech.com/content/images/globals/header_logo.png' # 2012-09-20 AGE: new
    masthead_url = 'http://www.anandtech.com/content/images/globals/printheader.png' # 2012-09-20 AGE: update


    remove_tags=[
                  dict(name='a', attrs={'class': 'bluebutton noprint'}),
                  dict(name='img', attrs={'alt': 'header'}),
                 ] # 2012-09-20 AGE: update
  
    feeds =  [ ('Anandtech', 'http://www.anandtech.com/rss/')]

    def print_version(self,url):
        return url.replace('0Cshow0C', '0Cprint0C') # 2012-09-20 AGE: update

Hope, you like it.
DivingDuck
Attached Files
File Type: zip AnandTech_upd_AGe 2012-09-20.zip (714 Bytes, 127 views)
Divingduck is offline   Reply With Quote