View Single Post
Old 08-01-2009, 03:24 PM   #632
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by hackettt View Post
Kovid and Darko —

Is there something I must do besides eliminating the code for other sections I do not want?
You are complicating things without real need. This is what you need to change in your recipe:

Code:
class AdvancedUserRecipe1249153260(BasicNewsRecipe):
    title          = u'DailyMail'
    oldest_article = 2
    max_articles_per_feed = 100
    no_stylesheets = True
    encoding = 'cp1252'

    keep_only_tags = [dict(name='div', attrs={'id':'js-article-text'})]

    remove_tags = [dict(name='div', attrs={'class':['relatedItems','article-icon-links-container']})]
    
    remove_tags_after = dict(name='h3', attrs={'class':'social-links-title'})
    
    feeds          = [(u'Sports', u'http://www.dailymail.co.uk/sport/index.rss')]

    def print_version(self, url):
        main = url.partition('?')[0]
        return main + '?printingPage=true'
kiklop74 is offline