Giter Club home page Giter Club logo

crusty-core's People

Contributors

let4be avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ousado

crusty-core's Issues

Rethink format of exposed data

We should not mangle data returned by server if there were no errors in getting it.
Actual errors are different from errors in filters/expanders

Support for fully customizable parsing

Right now we use select for html parsing, it's nice and everything but there are different use cases

For low volume crawling it might be a very good fit, but for broad crawling I'm considering switching to something lower level. So crusty-core should support configurable html parsers(and properly propagate it to task_expanders via generics)

Async channel based DNS resolver

Built on top of StaticAsyncResolver trying to resolve DNS by sending request and awaiting response on a channel, within timeout.

DNS resolving should be handled as a separate LinkTarget

This would allow for fancier filtering and additional logic, like for example in broad web crawler we might want to "discover" only reservable external domains, crusty-core could handle this resolution

Also should be useful for ip/subnet filtering if we want to restrict crawling certain subnets for example(not necessary just reserved ipv4/ipv6 addresses)

Implement non concurrent crawler

For broad web crawling we probably do not need any concurrency within a single job... which means we can save up a bunch of resources and annoy site owners less...
Additionally I'm considering using this in a so called "breeder" - a dedicated non-concurrent web crawler which purposes are

  • download && parse robots.txt, while
  • resolving redirects
  • resolving additional DNS requests(if any) as long as it falls within the same addr_key, see #14
  • head index page to figure out if there are any redirects(if allowed by robots.txt)
  • Jobs that resolved all DNS(within our restrictions) and successfully HEAD index page are considered "breeded"

all jobs extracted from JobQ will be added to a breeder first and only then to a typical web crawler(if they survive the breeding process) with a StaticDnsResolver(breeder and regular web crawler will have quite different rules and settings)

Unify calling and handling of filters

There's a big chunk of duplicated functionality between calling status_filters/load_filters && task_expanders
as soon as #9 && #8 are ready
this functionality becomes generic enough to be consolidated

Cleanup code

  • Simplify String/&str && get rid of excessive memory allocations
  • Get rid of excessive .clone() calls

Improve status_filters and their errors

  • In particular we should change how we handle max_redirect,

this should be happening in status_filter(when redirect is being emitted) not in task_filter as it's now
so that we could properly record a typed error and later compare against it in Crusty(proper metrics)

  • redirect status filter should always emit TERM when redirect is detected

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.