Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Use proper API in http_to_file #521

Description

@dgilman

http_to_file() in twitter_utils.py gets data out of the Response object as Response.raw.data which is a property from the underlying urllib3 library that doesn't do the proper decoding. If the server sent gzipped data it won't be decompressed. Response.content should be used instead as it handles the decoding for you (see https://github.com/requests/requests/blob/master/requests/models.py#L724 , decode_content=True)

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