Fix Gosc Niedzielny

This commit is contained in:
Kovid Goyal 2011-10-13 07:36:30 +05:30
parent 24ccb1a562
commit b6fab126dc

View File

@ -12,13 +12,14 @@ class GN(BasicNewsRecipe):
EDITION = 0 EDITION = 0
__author__ = 'Piotr Kontek' __author__ = 'Piotr Kontek'
title = u'Gość niedzielny' title = unicode('Gość niedzielny')
description = 'Weekly magazine' description = 'Weekly magazine'
encoding = 'utf-8' encoding = 'utf-8'
no_stylesheets = True no_stylesheets = True
language = 'pl' language = 'pl'
remove_javascript = True remove_javascript = True
temp_files = [] temp_files = []
simultaneous_downloads = 1
articles_are_obfuscated = True articles_are_obfuscated = True
@ -94,16 +95,16 @@ class GN(BasicNewsRecipe):
def find_articles(self, main_block): def find_articles(self, main_block):
for a in main_block.findAll('div', attrs={'class':'prev_doc2'}): for a in main_block.findAll('div', attrs={'class':'prev_doc2'}):
art = a.find('a') art = a.find('a')
yield { yield {
'title' : self.tag_to_string(art), 'title' : self.tag_to_string(art),
'url' : 'http://www.gosc.pl' + art['href'].replace('/doc/','/doc_pr/'), 'url' : 'http://www.gosc.pl' + art['href'].replace('/doc/','/doc_pr/'),
'date' : '', 'date' : '',
'description' : '' 'description' : ''
} }
for a in main_block.findAll('div', attrs={'class':'sr-document'}): for a in main_block.findAll('div', attrs={'class':'sr-document'}):
art = a.find('a') art = a.find('a')
yield { yield {
'title' : self.tag_to_string(art), 'title' : self.tag_to_string(art),
'url' : 'http://www.gosc.pl' + art['href'].replace('/doc/','/doc_pr/'), 'url' : 'http://www.gosc.pl' + art['href'].replace('/doc/','/doc_pr/'),
'date' : '', 'date' : '',