Fix bug #743178: Allow BasicNewsRecipe.delay to be a float and clarify docs.

This commit is contained in:
John Schember 2011-03-26 14:37:48 -04:00
parent 3ef9e4c9b2
commit 42f76d47ad
2 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,8 @@ class BasicNewsRecipe(Recipe):
#: Number of levels of links to follow on article webpages
recursions = 0
#: Delay between consecutive downloads in seconds
#: Delay between consecutive downloads in seconds. The argument may be a
#: floating point number to indicate a more precise time.
delay = 0
#: Publication type

View File

@ -486,7 +486,7 @@ def option_parser(usage=_('%prog URL\n\nWhere URL is for example http://google.c
type='int', dest='max_recursions')
parser.add_option('-n', '--max-files', default=sys.maxint, type='int', dest='max_files',
help=_('The maximum number of files to download. This only applies to files from <a href> tags. Default is %default'))
parser.add_option('--delay', default=0, dest='delay', type='int',
parser.add_option('--delay', default=0, dest='delay', type='float',
help=_('Minimum interval in seconds between consecutive fetches. Default is %default s'))
parser.add_option('--encoding', default=None,
help=_('The character encoding for the websites you are trying to download. The default is to try and guess the encoding.'))