Web scraping python程序在尝试发出get http请求时阻塞

Web scraping python程序在尝试发出get http请求时阻塞,web-scraping,python-requests,python-3.6,bad-request,Web Scraping,Python Requests,Python 3.6,Bad Request,我想通过使用向发送一个HTTP请求,一个GETone 任何浏览器都可以完成这项任务,我想用python来刺激它。这是我的密码: from requests import get headers = { 'Host': 'www.sahibinden.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1', 'Cookie': 'MS1=

我想通过使用向发送一个HTTP请求,一个
GET
one

任何浏览器都可以完成这项任务,我想用python来刺激它。这是我的密码:

from requests import get

headers = {
    'Host': 'www.sahibinden.com',
    'User-Agent':  'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1',
    'Cookie': 'MS1=https://www.sahibinden.com/category/en/real-estate; vid=668; cdid=FareXv19cbCTdery5b49a52a; MDR=20180606; __gfp_64b=bDEm7fs0Wb7A.7Rrxx3Vc8KWiV2tqUPA6HKxPqxMzzD.Q7; __gads=ID=c46feb38656fe808:T=1531553074:S=ALNI_MZsbdGGUmPpzuJMK0RROk--kk0Y9w; _ga=GA1.2.2138815818.1531553081; nwsh=std; showPremiumBanner=false; showCookiePolicy=true; userLastSearchSplashClosed=true; MS1=https://www.sahibinden.com/category/en/real-estate; st=a6abb06a0b0f9430ea7fdebd78bf1a15232062dddb59afb52b771d194a3529a1e30b6ca15b691061108084738973f686da6e51c3e00daf378',
    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
    'Accept-Encoding': 'gzip, deflate, br',
    'Accept-Language': 'en-US,en;q=0.9',
    'Connection': 'keep-alive',
    'Upgrade-Insecure-Requests': '1',
}
res = get(
    "https://www.sahibinden.com",
    headers=headers
)
print(res.status_code)
我尝试了浏览器的功能,所以我复制了浏览器设置的所有标题(标题可以在上面的代码中看到)

浏览器在不到3秒的时间内得到响应,并且显示的网站很好,但我的程序得到的是:

requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='www.sahibinden.com', port=443): Read timed out. (read timeout=10)

如何解决此问题?

如果您尝试
https://www.sahibinden.com
在get调用中?@Adrian
www.sahibinden.com
会导致错误。但使用“”解决了问题。