Looking at the python doc http://docs.python.org/library/urllib2.html
urllib2.urlopen(url[, data][, timeout])
So, I pass in a url, then optional data and timeout variables (from how I read it).
So if I want to pass a timeout, but not the data... whats the default variable for data? Do you just do,
urlopen('http://www.example.com/', , 5)
Thanks :)
You use the parameter names:
urlopen('http://www.exmaple.com/', timeout=5)
urlopen('http://www.example.com/',timeout=5)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With