From 8236c12d0106cc13cd24835646e36273c4745ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Sat, 24 Nov 2012 13:40:05 +0100 Subject: [PATCH] krytyka polityczna --- recipes/icons/kp.png | Bin 0 -> 485 bytes recipes/kp.recipe | 53 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 recipes/icons/kp.png create mode 100644 recipes/kp.recipe diff --git a/recipes/icons/kp.png b/recipes/icons/kp.png new file mode 100644 index 0000000000000000000000000000000000000000..6cdf52104de1021de941de83597d5716e04312d6 GIT binary patch literal 485 zcmVuV8-LLw?cXFDoaARbTAC#pVU1E0FL8$F_cocv0kqi_xl~kalBaZcpNF^9|EP6?~#k=^T}ed zU^<;*+ct?rf@-x&rBd+|xXkV$z~ypbG#W9V&$(W&TiC{4J8NqeoI1anr z4%0N*@Av4sPQ6~I)oPJWr+p&62ySWX^_t0Kf@N96Vlmq7HjPFDUDpvpe3UESGb^P? zrBW0M1%wbh9uKzLEyv^0SF(=)@N7vb$>nnN`+b_tCXq;l)oR6HFkm*Dal75TX?!@) zG|jV@OeX1eyYzZJGMNmPWicEMF-?>6`RpSJD5WTu%S5A5gb);qMF7I#Fx6_6Y&Oe! zy~eg}G)?1lI+0GN357zxr{_417tH+!-~EaAp58|u_}Z$wS4w@1%suzrSKrC}2R' + language = 'pl' + version = 1 + + title = u'Krytyka Polityczna' + category = u'News' + description = u' Lewicowe pismo zaangażowane w bieg spraw publicznych w Polsce.' + cover_url='' + remove_empty_feeds= True + no_stylesheets=True + oldest_article = 7 + max_articles_per_feed = 100000 + recursions = 0 + + no_stylesheets = True + remove_javascript = True + simultaneous_downloads = 3 + + keep_only_tags =[] + keep_only_tags.append(dict(name = 'h1', attrs = {'class' : 'print-title'})) + keep_only_tags.append(dict(name = 'div', attrs = {'class' : 'print-content'})) + + remove_tags =[] + remove_tags.append(dict(attrs = {'class' : ['field field-type-text field-field-story-switch', 'field field-type-filefield field-field-story-temp' , 'field field-type-text field-field-story-author', 'field field-type-text field-field-story-lead-switch']})) + + extra_css = ''' + body {font-family: verdana, arial, helvetica, geneva, sans-serif ;} + td.contentheading{font-size: large; font-weight: bold;} + ''' + + feeds = [ + ('Wszystkie', 'http://www.krytykapolityczna.pl/rss.xml') + ] + + def print_version(self, url): + soup = self.index_to_soup(url) + print_ico = soup.find(attrs = {'class' : 'print-page'}) + print_uri = print_ico['href'] + self.log('PRINT', print_uri) + return 'http://www.krytykapolityczna.pl/' + print_uri + + def preprocess_html(self, soup): + for alink in soup.findAll('a'): + if alink.string is not None: + tstr = alink.string + alink.replaceWith(tstr) + return soup