Giter Site home page Giter Site logo

Comments (2)

blakeembrey avatar blakeembrey commented on August 31, 2024

Seems like whatever the page is responding with isn't compressed properly. I'd love to know what exactly it is, other pages with the same headers work using zlib. I can replicate the same behaviour using curl and gunzip on the CLI. E.g.

curl -H 'Accept-Encoding: gzip,deflate' https://github.com | gunzip -dc # works
curl -H 'Accept-Encoding: gzip, deflate' http://www.concordmonitor.com/on-new-hampshire-s-antique-alley-it-s-out-with-the-old-in-with-the-new-9234789 | gunzip -dc # errors with "unknown compression format"

Note: One page is gzip and the other is deflate. Not sure if there's a good page using deflate available to test?

According to https://nodejs.org/api/zlib.html#zlib_compressing_http_requests_and_responses both types of responses should be handled by node.js properly and I haven't seen it before. Anyone else have ideas to fix it? I can try splitting out to the specific methods zlib methods used instead of the combined method. Someone else want to test that fixes it first though? I might not get around to it for a while.

from metascraper.

Kikobeats avatar Kikobeats commented on August 31, 2024

Closing that because 2.0.0 move HTTP calls out of the library, stay stunning!

from metascraper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.