Quote:
Originally Posted by Semonski
Thank you so much..... I'm trying it out now.....
Kos 
|
Your recipe is too complicated. This is simplified and cleaned-up version (add more feeds, this is just example):
Code:
class Telegram(BasicNewsRecipe):
title = 'Telegram'
oldest_article = 2
max_articles_per_feed = 100
no_stylesheets = False
use_embedded_content = False
encoding = 'cp1252'
publication_type = 'newspaper'
remove_empty_feeds = True
extra_css = ' body{font-family: Verdana,sans-serif} .headline{font-size: xx-large; font-weight: bold} .mainPhotoCaption{font-size: x-small} '
keep_only_tags = [dict(name='div', attrs={'id':'articleWell'})]
remove_tags_before = dict(attrs={'class':'headline'})
remove_tags_after = dict(attrs={'id':'zoom1'})
remove_tags = [
dict(name='div', attrs={'class':'relatedContent'})
,dict(name=['object','link','iframe'])
]
feeds = [
(u'Front page' , u'http://www.telegram.com/apps/pbcs.dll/section?Category=RSS03&MIME=xml')
]
def preprocess_html(self, soup):
return self.adeify_images(soup)