Add delay between consecutive feed downloads according to recipe's delay value

This commit is contained in:
Michał Szkutnik 2011-11-29 22:50:30 +01:00
parent 8d019b4267
commit c349fe1e33

View File

@ -1398,6 +1398,8 @@ class BasicNewsRecipe(Recipe):
oldest_article=self.oldest_article,
max_articles_per_feed=self.max_articles_per_feed,
get_article_url=self.get_article_url))
if (self.delay > 0):
time.sleep(self.delay)
except Exception as err:
feed = Feed()
msg = 'Failed feed: %s'%(title if title else url)