miyakogi / pyppeteer

Headless chrome/chromium automation library (unofficial port of puppeteer)
Other
3.56k stars 372 forks source link

Response.buffer() return str rather than [bytes] #289

Open Yang-z opened 4 years ago

Yang-z commented 4 years ago

When I try to get raw data of response body, the buffer() always returns data in the form of 'str'. This is not what the API Reference says: buffer() → Awaitable[bytes]

The body data in my case is 'amf', so I try to encode the 'str' data before pass it to a 'amf' parser(such as py3Amf), but the result is unresovable. Then I try to catch 'amf' data by Charles, and find that the binary data generated by res.buffer().encode() is differ from that catched by Charles. (Charles gives the right 'amf' data in binary, which is parsable.)

Please help.

Mattwmaster58 commented 4 years ago

Hi @Yang-z, it looks like this project has been abandoned. You may want to consider the active fork pyppeteer2. Feel free to create an issue there if your problem persists with the updated libary.