This commit is contained in:
Kovid Goyal 2014-05-26 08:39:38 +05:30
parent bc93263942
commit 8908f0b83c

View File

@ -53,10 +53,10 @@ class FazNet(BasicNewsRecipe):
nexturl = self.INDEX + pager['href'] nexturl = self.INDEX + pager['href']
soup2 = self.index_to_soup(nexturl) soup2 = self.index_to_soup(nexturl)
texttag = soup2.find('div', attrs={'class':'FAZArtikelContent'}) texttag = soup2.find('div', attrs={'class':'FAZArtikelContent'})
texttag.find('div', attrs={'class':'ArtikelFooter'}).extract() for cls in ('ArtikelFooter', 'ArtikelAbbinder', 'ArtikelKommentieren Artikelfuss GETS;tk;boxen.top-lesermeinungen;tp;content', 'Anzeige GoogleAdsBuehne'):
texttag.find('div', attrs={'class':'ArtikelAbbinder'}).extract() div = texttag.find(attrs={'class':cls})
texttag.find('div', attrs={'class':'ArtikelKommentieren Artikelfuss GETS;tk;boxen.top-lesermeinungen;tp;content'}).extract() if div is not None:
texttag.find('div', attrs={'class':'Anzeige GoogleAdsBuehne'}).extract() div.extract()
newpos = len(texttag.contents) newpos = len(texttag.contents)
self.append_page(soup2,texttag,newpos) self.append_page(soup2,texttag,newpos)
texttag.extract() texttag.extract()