Giter VIP home page Giter VIP logo

webcrawler's Introduction

Webcrawler

ci.yml

The service for crawling websites (experimental)

Dependencies

Project setup

From the project root, inside shell, run:

  • make pull to pull latest images
  • make init to install fresh dependencies
  • make up to run app containers

Now you can visit localhost:4000 from your browser.

  • make down - to extinguish running containers
  • make help - for additional commands

Howitworks

  1. The user adds new source URL -> new async job started
  2. Inside the job:
  • Normalize URL (validate schema, remove trailing slash, etc...)
  • Store link in DB, if link already exists, than exit
  • Parse HTML links and metadata
  • Store it in different tables
  • Normalize links, check wether it relational or not.
  • Check links are external
  • For each non-external link -> schedule new async job with some random interval
  1. Thats literally it

To see it in action, go to the localhost:4000/crawl and type any kind of URL.

To see some search results visit localhost:4000/search.

Database schema

The default keyspace is storage

Tables:

  • site_statistics contains source URLs and counting parsed links
  • sites contains URL and HTML parsed
  • sites_by_meta contains URL and parsed metadata

For LIKE-style search queries SASI index needs to be configured.

See schema.cql and cassandra.yaml for more detail.

Useful links

License

MIT. Please see the license file for more information.

webcrawler's People

Contributors

shirokovnv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.