mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
deduplicate code snippet
This commit is contained in:
parent
373b3c7a22
commit
e8ada93dda
@ -47,13 +47,7 @@ class GN(BasicNewsRecipe):
|
||||
return feeds
|
||||
|
||||
def find_articles(self, main_block):
|
||||
for a in main_block.findAll('div', attrs={'class':'prev_doc2'}):
|
||||
art = a.find('a')
|
||||
yield {
|
||||
'title' : self.tag_to_string(art),
|
||||
'url' : 'http://www.gosc.pl' + art['href']
|
||||
}
|
||||
for a in main_block.findAll('div', attrs={'class':'sr-document'}):
|
||||
for a in main_block.findAll('div', attrs={'class':['prev_doc2', 'sr-document']}):
|
||||
art = a.find('a')
|
||||
yield {
|
||||
'title' : self.tag_to_string(art),
|
||||
|
Loading…
x
Reference in New Issue
Block a user