caoyufei
V2EX  ›  问与答

Python 使用 Tinyproxy 代理问题

  •  
  •   caoyufei · Jan 9, 2018 · 2155 views
    This topic created in 3072 days ago, the information mentioned may be changed or developed.

    服务器上搭了个 Tinyproxy 代理

    在另外一台服务商测试代理 OK
    curl -x ip:8888 -I 'http://t66y.com/'
    
    proxy_handler = urllib2.ProxyHandler({'http': 'IP:8888'})
    opener = urllib2.build_opener(proxy_handler)
    opener.addheaders.append(headers)
    req = opener.open(url, timeout=10)
    
    • 返回 HTTP Error 403: Forbidden

    • JAVA 用这个 HTTP 代理 访问 t66y 是正常的

    • 这是代理问题,还是我 python 写的有问题?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   963 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 22:07 · PVG 06:07 · LAX 15:07 · JFK 18:07
    ♥ Do have faith in what you're doing.