Fix #6930 (Updated recipe for Danas)

This commit is contained in:
Kovid Goyal 2010-09-24 09:59:46 -06:00
parent c792c47a65
commit 45ed048612

View File

@ -51,8 +51,14 @@ class Danas(BasicNewsRecipe):
preprocess_regexps = [
(re.compile(u'\u0110'), lambda match: u'\u00D0')
,(re.compile(u'\u201c'), lambda match: '"')
,(re.compile(u'\u201e'), lambda match: '"')
,(re.compile(u'\u2018'), lambda match: '‘') # left single quotation mark
,(re.compile(u'\u2019'), lambda match: '’') # right single quotation mark
,(re.compile(u'\u201a'), lambda match: '‘') # single low-9 quotation mark
,(re.compile(u'\u201b'), lambda match: '’') # single high-reversed-9 quotation mark
,(re.compile(u'\u201c'), lambda match: '“') # left double quotation mark
,(re.compile(u'\u201d'), lambda match: '”') # right double quotation mark
,(re.compile(u'\u201e'), lambda match: '“') # double low-9 quotation mark
,(re.compile(u'\u201f'), lambda match: '”') # double high-reversed-9 quotation mark
]
keep_only_tags = [dict(name='div', attrs={'id':'left'})]
@ -90,6 +96,8 @@ class Danas(BasicNewsRecipe):
,(u'Vostani Serbie' , u'http://www.danas.rs/rss/rss.asp?column_id=57')
,(u'Med&Jad-a' , u'http://www.danas.rs/rss/rss.asp?column_id=58')
,(u'Svetlosti pozornice' , u'http://www.danas.rs/rss/rss.asp?column_id=59')
,(u'Dva cvancika' , u'http://www.danas.rs/rss/rss.asp?column_id=65')
,(u'Iz kornera' , u'http://www.danas.rs/rss/rss.asp?column_id=64')
]
def preprocess_html(self, soup):