mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
add articles' descriptions and dates
This commit is contained in:
parent
13ad540a05
commit
c54d832d06
@ -31,10 +31,12 @@ class GN(BasicNewsRecipe):
|
|||||||
self.cover_url = 'http://www.gosc.pl' + soup.find('div',attrs={'class':'fl-w100 release-wp'}).findAll('a')[-4].contents[0]['src']
|
self.cover_url = 'http://www.gosc.pl' + soup.find('div',attrs={'class':'fl-w100 release-wp'}).findAll('a')[-4].contents[0]['src']
|
||||||
feeds = []
|
feeds = []
|
||||||
# wstepniak
|
# wstepniak
|
||||||
a = soup.find('div',attrs={'class':'release-wp-b'}).find('a')
|
a = soup.find('div',attrs={'class':'release-wp-b'})
|
||||||
|
art = a.find('a')
|
||||||
articles = [
|
articles = [
|
||||||
{'title' : self.tag_to_string(a),
|
{'title' : self.tag_to_string(art),
|
||||||
'url' : 'http://www.gosc.pl' + a['href']
|
'url' : 'http://www.gosc.pl' + art['href'],
|
||||||
|
'description' : self.tag_to_string(a.find('p',attrs={'class':'b lead'}))
|
||||||
}]
|
}]
|
||||||
feeds.append((u'Wstępniak',articles))
|
feeds.append((u'Wstępniak',articles))
|
||||||
# kategorie
|
# kategorie
|
||||||
@ -52,7 +54,9 @@ class GN(BasicNewsRecipe):
|
|||||||
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']
|
'url' : 'http://www.gosc.pl' + art['href'],
|
||||||
|
'date' : self.tag_to_string(a.find('p', attrs={'class':'sr-date'})),
|
||||||
|
'description' : self.tag_to_string(a.find('p', attrs={'class':'sr-lead'}))
|
||||||
}
|
}
|
||||||
|
|
||||||
def append_page(self, soup, appendtag):
|
def append_page(self, soup, appendtag):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user