Proxy does not work in requests (log: password:ip:port)



  • Hello! I'm trying to evaporate the proxy site, but they don't work. Proxy Format: logical: password:ip:port Stroke with proxy: введите сюда описание изображения Code connection:

    import requests
    import re
    from bs4 import BeautifulSoup
    import config as c
    s = requests.Session()
    s.proxies.update(c.proxies)
    response = s.get(url=c.lolz_url + "market/", headers=c.hes, cookies=c.cookis)
    

    erroneous: requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='lolz.guru', port=443): Max retries exceeded with url: /market/ (Caused by ConnectTimeoutError(over_down time)connection.HTTPSConnection object at 0x00000251FD178DF

    Proxy's a worker.



  • https_proxy = "https://10.10.1.11:1080"
    ftp_proxy   = "ftp://10.10.1.10:3128"
    
    proxyDict = { 
                  "http"  : http_proxy, 
                  "https" : https_proxy, 
                  "ftp"   : ftp_proxy
                }
    
    r = requests.get(url, headers=headers, proxies=proxyDict)
    

    I think it'll help you.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2