mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:35:46 +02:00
Update The Spectator
Fixes #1667673 [Feed for Spectator not working](https://bugs.launchpad.net/calibre/+bug/1667673)
This commit is contained in:
parent
d76f07ef6f
commit
c758fe09ee
1 changed files with 3 additions and 1 deletions
|
|
@ -35,6 +35,8 @@ def parse_spec_section(self, div):
|
|||
articles = []
|
||||
for div in div.findAll('div', id=lambda x: x and x.startswith('post-')):
|
||||
h2 = div.find('h2', attrs={'class': class_sel('term-item__title')})
|
||||
if h2 is None:
|
||||
h2 = div.find(attrs={'class': class_sel('news-listing__title')})
|
||||
title = self.tag_to_string(h2)
|
||||
a = h2.find('a')
|
||||
url = a['href']
|
||||
|
|
@ -47,7 +49,7 @@ def parse_spec_section(self, div):
|
|||
return sectitle, articles
|
||||
|
||||
def parse_index(self):
|
||||
soup = self.index_to_soup('http://www.spectator.co.uk/magazine/')
|
||||
soup = self.index_to_soup('https://www.spectator.co.uk/magazine/')
|
||||
a = soup.find('a', attrs={'class': 'issue-details__cover-link'})
|
||||
self.timefmt = a['title']
|
||||
self.cover_url = a['href']
|
||||
|
|
|
|||
Loading…
Reference in a new issue