Giter Site home page Giter Site logo

rust-warc's People

Contributors

orottier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rust-warc's Issues

Bug: reads only the archive info record of common crawl record(s)

I don't know if this is maintained, but I came here because warc took 34 seconds just to iterate through an archive with no processing and I wanted to see if this crate was faster.

I tried to read the Commoncrawl archive file CC-MAIN-20221210042021-20221210072021-00866.warc.gz (link, 1.1 GB compressed file) through a GzDecoder with a BufReader on top but I only get the first record:

pub fn analyse_warc(path: &str) -> Result<(), std::io::Error> {
    let f = File::open(path)?;
    let decoder = GzDecoder::new(f);
    let reader = BufReader::new(decoder);

    let warc = WarcReader::new(reader);
    for item in warc {
        println!("WARC: {:#?}", item.unwrap().header);
    }
}

Prints:

WARC: {
    CaseString {
        inner: "content-length",
    }: "500",
    CaseString {
        inner: "warc-date",
    }: "2022-12-10T04:20:21Z",
    CaseString {
        inner: "warc-type",
    }: "warcinfo",
    CaseString {
        inner: "content-type",
    }: "application/warc-fields",
    CaseString {
        inner: "warc-filename",
    }: "CC-MAIN-20221210042021-20221210072021-00866.warc.gz",
    CaseString {
        inner: "warc-record-id",
    }: "<urn:uuid:e609d058-9d7c-45ee-9292-eba237b4de5c>",
}

My guess would be that this would apply to all of the commoncrawl records.

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.