This commit is contained in:
Kovid Goyal 2012-05-09 23:50:50 +05:30
parent 9c554a0106
commit d8d8ce7e62

View File

@ -1,5 +1,5 @@
"""
Pocket Calibre Recipe v1.0
Pocket Calibre Recipe v1.1
"""
__license__ = 'GPL v3'
__copyright__ = '''
@ -73,6 +73,9 @@ class Pocket(BasicNewsRecipe):
articles = []
soup = self.index_to_soup(feedurl)
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')):
if articlesToGrab < 1:
break
@ -94,7 +97,7 @@ class Pocket(BasicNewsRecipe):
self.readList.append(readLink)
totalfeeds.append((feedtitle, 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
def mark_as_read(self, markList):