高洛峰2017-04-18 09:35:01
For this kind of task, of course the priority is to find wheels
http://stackoverflow.com/ques...
https://github.com/aivarsk/sc...
大家讲道理2017-04-18 09:35:01
If an IP is not explicitly bound, which IP is used for the final source address is determined by routing.
Explicitly binding the IP can indeed solve your problem, but it is not easy to let urllib2 or requests use the created (and bound) socket without changing the library code.
The following is an article on how to make requests use the created socket: http://stackoverflow.com/ques...