mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Slate
Fixes #1774841 [Failed: Fetch news from Slate](https://bugs.launchpad.net/calibre/+bug/1774841)
This commit is contained in:
parent
000c53b3b2
commit
775ea77de5
@ -65,6 +65,8 @@ class Slate(BasicNewsRecipe):
|
|||||||
def slate_section_articles(self, soup):
|
def slate_section_articles(self, soup):
|
||||||
ans = []
|
ans = []
|
||||||
main = soup.find('article', attrs={'class': 'main'})
|
main = soup.find('article', attrs={'class': 'main'})
|
||||||
|
if main is None:
|
||||||
|
return ans
|
||||||
for a in main.findAll('a', attrs={'class': 'primary'}):
|
for a in main.findAll('a', attrs={'class': 'primary'}):
|
||||||
url = a['href']
|
url = a['href']
|
||||||
if url.endswith('/'):
|
if url.endswith('/'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user