shodan-python
shodan-python copied to clipboard
Added timeout to session requests
I've been having issues lately with shodan.count with the python client. It seems to hang at this get request. I went ahead and gave the get request a timeout of 1, while allowing retries up to five times. This works for me, if there is a better way please feel free to let me know!
Most of the time, it simply needs one retry. I played with the timeout time, and anything above1 takes way to long, 1 seemed to be the best.
Fixes #167
I should note this is after consecutively running a program I am writing that calls this count method.