我正试图通过代理服务器向这个URLhttps://verify-email.org/home/verify-as-guest/example@example.com发送请求。你知道吗
我在这里获得了代理服务器: https://free-proxy-list.net/
验证电子邮件网站每小时免费验证5封电子邮件。你知道吗
当我使用代理服务器时,如果我不断更改代理服务器,我可以绕过这个限制。这在我使用curl时有效:
curl --proxy http://IP:PORT https://verify-email.org/home/verify-as-guest/example@example.com
上面的命令非常有效。你知道吗
但是,当我在python中执行同样的操作时:
import requests
from pprint import pprint
def check_email(email):
proxyDict = {
"http" : 'http://IP:PORT'
}
result = requests.get('https://verify-email.org/home/verify-as-guest/' + email, proxies=proxyDict, timeout=5).json()
pprint(result)
check_email('example@example.com')
它不起作用。它只给了我5次尝试,然后停止工作,即使我改变了IP,这让我相信curl发送的请求和requests发送的请求是不同的。你知道吗
有什么方法可以在python请求中获得相同的“curl”请求吗?你知道吗
proxyDict
只包含用于不安全的http请求的代理,但服务正在使用https
。你知道吗试试看
相关问题 更多 >
编程相关推荐