Giter VIP home page Giter VIP logo

Comments (5)

janbuchar avatar janbuchar commented on August 23, 2024

Looks like the sitemap you reference points to another - https://www.paypal-community.com/sitemap_threads.xml.gz - which is not gzipped, despite its name. Why would anyone do this is beyond me. I guess we could add an option to Sitemap.load to override the type 🤷... Trying to recover automatically seems futile to me.

EDIT: the server uses in-transit gzip encoding, which is however a different thing than what the .xml.gz extension is supposed to mean

from crawlee.

B4nan avatar B4nan commented on August 23, 2024

Can't we detect this based on some initial bytes? Hard to trust extensions for anything these days :D

edit: something like this

In the modified code, we are checking for the GZip file format by comparing the first 2 bytes of the file with the expected byte sequence ({&H1F, &H8B}). GZip files typically start with these two bytes.

from crawlee.

janbuchar avatar janbuchar commented on August 23, 2024

Can't we detect this based on some initial bytes? Hard to trust extensions for anything these days :D

It's gonna be tricky since we use streams, but feasible, I guess.

from crawlee.

barjin avatar barjin commented on August 23, 2024

You can use file-type (example with streams here), in WCC it worked pretty well. You can even pipe through it 👀

from crawlee.

barjin avatar barjin commented on August 23, 2024

obrazek

More WCC users are complaining about this. Do we know how to approach this issue yet?

from crawlee.

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.