Scrapy response is an Invalid/Unknown String

Question:

Good day, I’m having some issues with a scrapy script I wrote.
The code works perfectly on my local machine, but when I run it on an ubuntu server, I’m getting response like this

cx00�^x00@6Us�e�yV�x17~J��'x1d$B2c�����5��F8x10��M#[�(nxm��C���p�x05R [��x00x02v`,/�x00��˛��Pv�p+ �1rgq�p��x15��x18�/��x01mQ

Response code is ok. But the text is the above unreadable sequence

Asked By: Aiisc Sunday

||

Answers:

You are getting compressed data.

Remove the Accept-Encoding line from your headers and try again.

If it doesn’t work try to set Accept-Encoding: deflate.

Answered By: SuperUser