mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
9c554a0106
commit
d8d8ce7e62
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Pocket Calibre Recipe v1.0
|
Pocket Calibre Recipe v1.1
|
||||||
"""
|
"""
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '''
|
__copyright__ = '''
|
||||||
@ -73,6 +73,9 @@ class Pocket(BasicNewsRecipe):
|
|||||||
articles = []
|
articles = []
|
||||||
soup = self.index_to_soup(feedurl)
|
soup = self.index_to_soup(feedurl)
|
||||||
ritem = soup.find('ul', attrs={'id':'list'})
|
ritem = soup.find('ul', attrs={'id':'list'})
|
||||||
|
if ritem is None:
|
||||||
|
self.log.exception("Page %s skipped: invalid HTML" % (feedtitle if feedtitle else feedurl))
|
||||||
|
continue
|
||||||
for item in reversed(ritem.findAll('li')):
|
for item in reversed(ritem.findAll('li')):
|
||||||
if articlesToGrab < 1:
|
if articlesToGrab < 1:
|
||||||
break
|
break
|
||||||
@ -94,7 +97,7 @@ class Pocket(BasicNewsRecipe):
|
|||||||
self.readList.append(readLink)
|
self.readList.append(readLink)
|
||||||
totalfeeds.append((feedtitle, articles))
|
totalfeeds.append((feedtitle, articles))
|
||||||
if len(self.readList) < self.minimum_articles:
|
if len(self.readList) < self.minimum_articles:
|
||||||
raise Exception("Not enough articles in RIL! Change minimum_articles or add more.")
|
raise Exception("Not enough articles in Pocket! Change minimum_articles or add more articles.")
|
||||||
return totalfeeds
|
return totalfeeds
|
||||||
|
|
||||||
def mark_as_read(self, markList):
|
def mark_as_read(self, markList):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user