Open xtekky opened 9 months ago
the response.content contains many repeat special characters \xef\xbf\xbd, what I thought is if we can delete them.
append: success delete \xef\xbf\xbd from response.content, but the value change too much, still can't parse. so I think there's something wrong in handling raw binary data in tls-client since standard requests/curl-cffi/httpx all give the correct response. what a pity.
@xtekky did you reached any solution?
unfortunately no, but it does work with curl_cffi, httpx, requests etc.. so you may try those libraries.
I can confirm having exactly the same bug on binary content
Fixed here https://github.com/iamtorsten/tls-client
Py Package tls-client2
I saw that several issues were raised, and most solved using the new
additional_decode
parameter, however this does not work for me, but everything works fine using the normal requests library.I tried removing / setting the
"accept-encoding"
header to combinations ofgzip
,deflate
,br
also while using theadditional_decode
parameter. All of those did not work.correct data (using
requests
):incorrect:
there is a repetition of
efbfbd
which corresponds to the Unicode Replacement Character inUTF-8
encoding (U+FFFD
). Replacing it with nothing wont solve the issueany fixes ?
p.s.: the request made was to
tiktokv.com
and the response is a protobuf (in bytes). The response header indicates that the content isapplication/octet-stream
, which i suppose requests decodes and this library does not