View Single Post
Old 06-17-2011, 07:42 AM   #2
sexymax15
Enthusiast
sexymax15 began at the beginning.
 
sexymax15's Avatar
 
Posts: 30
Karma: 12
Join Date: Jun 2011
Location: India
Device: Kindle 3g
Here's your recipe for Mail & Guardian Online(South Africa). The recipe is fine. No junks in articles. I am using the print version pages.

Spoiler:

Code:
class AdvancedUserRecipe1308308835(BasicNewsRecipe):
    title          = u'Mail & Guardian Online(South Africa)'
    oldest_article = 10
    max_articles_per_feed = 15
    use_embedded_content = False

    remove_empty_feeds = True
    no_stylesheets = True
    remove_javascript = True
    remove_tags_after = [dict(name= 'p')]
    extra_css             = """ h1{font-family: Georgia,serif; font-size: x-large}
                               h2{font-family: Georgia,serif;font-style:italic; font-size: small} """


    feeds          = [(u'Top Stories', u'http://www.mg.co.za/rss'), (u'National News', u'http://www.mg.co.za/rss/national'), (u'Sports', u'http://www.mg.co.za/rss/sport'), (u'Business', u'http://www.mg.co.za/rss/business'), (u'International', u'http://www.mg.co.za/rss/world'), (u'Africa', u'http://www.mg.co.za/rss/africa'), (u'Offbeat News', u'http://www.mg.co.za/rss/and-in-other-news')]

    def print_version(self, url):
        return url.replace('/article/','/printformat/single/')

Screenshot:


Moderator Notice
Edited to add tags.
Attached Files
File Type: zip Mail & Guardian Online(South Africa)_1127.zip (670 Bytes, 157 views)

Last edited by Starson17; 06-17-2011 at 09:36 AM.
sexymax15 is offline   Reply With Quote