update recipes for Gość Niedzielny

This commit is contained in:
Tomasz Długosz 2018-06-30 22:58:35 +02:00
parent e4240427f1
commit 53f5f5312a
2 changed files with 4 additions and 2 deletions

View File

@ -70,7 +70,7 @@ class GN(BasicNewsRecipe):
not_assigned.extend(articles)
page += 1
pages = soup.find('span', attrs={'class': 'pgr_nrs'})
if str(page) not in [self.tag_to_string(x)[1] for x in pages.findAll('a')]:
if str(page) not in [self.tag_to_string(x) for x in pages.findAll('a')]:
break
feeds.append((u'Nieprzypisane', not_assigned))
@ -107,9 +107,11 @@ class GN(BasicNewsRecipe):
r.extract()
for r in soup.findAll(attrs={'class': ['di_dr', 'doc_image']}):
del r['style']
'''
for r in soup.findAll(attrs={'class': 'cm-i-a'}):
r.replaceWith('<div style="clear:both"></div>' +
r.prettify() + '<div style="clear:both"></div>')
'''
return soup
keep_only_tags = [

View File

@ -66,7 +66,7 @@ class GN(BasicNewsRecipe):
not_assigned.extend(articles)
page += 1
pages = soup.find('span', attrs={'class': 'pgr_nrs'})
if str(page) not in [self.tag_to_string(x)[1] for x in pages.findAll('a')]:
if str(page) not in [self.tag_to_string(x) for x in pages.findAll('a')]:
break
feeds.append((u'Nieprzypisane', not_assigned))