Skip to content

Can't download any image using response.content #83

Open
@rageshhub

Description

@rageshhub
# import requests
import tls_client
session = tls_client.Session(
    client_identifier="chrome112",
)
with open("image.png", 'wb') as f:
    r = session.get('https://img.freepik.com/free-photo/flowing-purple-mountain-spiral-bright-imagination-generated-by-ai_188544-9853.jpg?q=10&h=200')
    print(r.status_code)
    f.write(r.content)

I can write the image if I used request. But if I try using tls_client the image is corrupted

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