View Single Post
Old 06-16-2011, 06:10 AM   #1
sexymax15
Enthusiast
sexymax15 began at the beginning.
 
sexymax15's Avatar
 
Posts: 30
Karma: 12
Join Date: Jun 2011
Location: India
Device: Kindle 3g
Outlook(Indian) Recipe

Hi guys...here is the recipe of Outlook(http://www.outlookindia.com/).
Quote:
import re

from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.chardet import xml_to_unicode
class AdvancedUserRecipe1307834113(BasicNewsRecipe):
title = u'Outlook'
oldest_article = 30
max_articles_per_feed = 20
no_stylesheets = True
remove_javascript = True
remove_attributes = ['width','height']
use_embedded_content = False
language = 'en_IN'
remove_empty_feeds = True
remove_tags_before = dict(id='ctl00_cphpagemiddle_reparticle_ctl00_divf spheading', attrs={'class':'fspheading'})
remove_tags = [dict(id=['iframe'])]
remove_tags_after = dict(id='ctl00_cphpagemiddle_reparticle_ctl00_divp agination')
feeds = [(u'Magazine', u'http://www.outlookindia.com/rss/main/magazine'), (u'Cover', u'http://www.outlookindia.com/rss/features/cover'), (u'Essay', u'http://www.outlookindia.com/rss/features/essays'), (u'Opinion', u'http://www.outlookindia.com/rss/features/opinion')]
def print_version(self, url):
return url.replace('/article.aspx?','/printarticle.aspx?')
Attached Files
File Type: zip Outlook_1095.zip (638 Bytes, 164 views)
sexymax15 is offline   Reply With Quote