首页 > python中的request模块可以指定IP吗?

python中的request模块可以指定IP吗?

同样一个网站,我们有内网和外网两个环境,希望能指定IP以获得网站在不同IP下的表现。


http://stackoverflow.com/questions/29995133/python-requests-use-navigate-site-by-servers-ip
requests.get('http://127.0.0.1/foo.php', headers={'host': 'example.com'})

【热门文章】
【热门文章】