Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiplier def set to None ,will be 0 is better #51

Open
bluescity opened this issue Sep 26, 2015 · 0 comments · May be fixed by #53
Open

multiplier def set to None ,will be 0 is better #51

bluescity opened this issue Sep 26, 2015 · 0 comments · May be fixed by #53

Comments

@bluescity
Copy link

sorry, i dont understand english.
if you set parameter tries , parameter can not be None(it's def ,it's be 0 better

error code :
import robobrowser
r = robobrowser.RoboBrowser(tries=3)
r.open("http://www.gosdfagle.com") #any not exist site

to fix this:
file: browser.py
line 70:
def init(self, session=None, parser=None, user_agent=None,
history=True, timeout=None, allow_redirects=True, cache=False,
cache_patterns=None, max_age=None, max_count=None, tries=None,
multiplier=None):
change to:
def init(self, session=None, parser=None, user_agent=None,
history=True, timeout=None, allow_redirects=True, cache=False,
cache_patterns=None, max_age=None, max_count=None, tries=None,
multiplier=0):

rcutmore added a commit to rcutmore/robobrowser that referenced this issue Oct 14, 2015
Updated RoboBrowser class to default to a retry multiplier of 0
instead of None. Previously when set to None a TypeError would be
raised in the get_backoff_time method of urllib3's Retry class.

[Resolves jmcarp#51]
rcutmore added a commit to rcutmore/robobrowser that referenced this issue Oct 14, 2015
Updated RoboBrowser class to default to a retry multiplier of 0
instead of None. Previously when set to None a TypeError would be
raised in the get_backoff_time method of urllib3's Retry class.

[Resolves jmcarp#51]
@rcutmore rcutmore linked a pull request Oct 14, 2015 that will close this issue
rcutmore added a commit to rcutmore/robobrowser that referenced this issue Oct 14, 2015
Updated RoboBrowser class to default to a retry multiplier of 0
instead of None. Previously when set to None a TypeError would be
raised in the get_backoff_time method of urllib3's Retry class.

[Resolves jmcarp#51]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant