Skip to content

下载图片 错误 bug 你们都没有发现吗 Did you not notice the download image error bug #143

Description

@gugugudo

import tls_client

session = tls_client.Session(
client_identifier="chrome_120",

random_tls_extension_order=True

)

请求图片地址(示例)

image_url = "https://httpbin.org/image/jpeg"

response = session.get(image_url,)
print(response.text)

检查响应状态

if response.status_code == 200:
with open("image.jpg", "wb") as f:
f.write(response.content)
print("图片已保存为 image.jpg")
else:
print(f"请求失败,状态码:{response.status_code}")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions