Просмотр исходного кода

added cookies (#27)

After solving the CAPTCHA the categorization request will fail without cookies.
UA3 5 лет назад
Родитель
Сommit
96e89346c4
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      domainhunter.py

+ 1 - 1
domainhunter.py

@@ -109,7 +109,7 @@ def checkBluecoat(domain):
                     response = s.get(url=captchasolutionURL,headers=headers,verify=False,proxies=proxies)
 
                     # Try the categorization request again
-                    response = s.post(url,headers=headers,json=postData,verify=False,proxies=proxies)
+                    response = s.post(url,headers=headers,cookies=c,json=postData,verify=False,proxies=proxies)
 
                     responseJSON = json.loads(response.text)