我是否使用代理发送请求,对吗?

2024-09-30 18:25:14 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我的密码

    while True:
        proxies_index += 1
        try:
            session = requests.session()

            # Sending a get request to a streamer's livestream
            response = session.head(url="https://cod.live/2021/05/25/daily-twitch-livestream-pick-of-the-day/",
                                    timeout=1, proxies={"http": zproxy.lum-superproxy.io:22225:lum-customer-hl_7d92cb5c-zone-twitchproxies-ip-158.46.169.208:lgzehj9rl6u3})

            if response.status_code == 200:
                requests_sent += 1

                if requests_sent % 10 == 0:
                    print(requests_sent)

        except Exception:
            pass

目前,我正在尝试为某人的twitch频道创建人工观众。我一直在发送代理与请求,但观众计数没有任何变化。每个代理基本上如下所示:zproxy.lum-superproxy.io:22225:lum-customer-hl_7d92cb5c-zone-twitchproxies-ip-158.46.169.208:lgzehj9rl6u3

我使用的代理错误吗?仅供参考,这些代理都来自brightdata


Tags: iozone代理responsesessioncustomerrequestshl