Git Product home page Git Product logo

venom's Introduction

Venom

Your preferred open source focused crawler for the Deep Web.

Maven Central Build Status Coverage Status Javadoc

Overview

Our aim is to create a blazing fast, fully customizable and robust crawler that is simple and handy to use.

Quick links

Website | API Reference | Wiki | Examples | Tutorial | PreferredAI

Features

  • Multi-threaded out of the box
  • Structured crawling with JSoup integration
  • Page Validation
  • Automatic Retries
  • Proxy support
  • Auto-save raw html pages

Getting started

Getting started with Venom is quick and easy. There are two ways to get started.

Clone our examples or tutorial

If you are starting out in a new project, you can consider cloning our Examples:

git clone https://github.com/PreferredAI/venom-examples.git

or, if you would like a more guided package, you can check out our Tutorial:

git clone https://github.com/PreferredAI/venom-tutorial.git

Add a dependency

If you already have a project then just add Venom as a dependency to your pom.xml:

<dependency>
    <!-- Venom: Your preferred focused crawler @ https://venom.preferred.ai/ -->
    <groupId>ai.preferred</groupId>
    <artifactId>venom</artifactId>
    <version>[4.2,4.3)</version>
</dependency>

Tutorial

If you are new to Venom, we have created a set of exercises to get you up and sprinting. The exercises are bundled in venom-tutorials. More information can be found on this page.

Wiki

If you would like more information check out our Wiki.

Example

Think you are beyond exercises? Get started quickly with these few lines of code.

public class Example {
 
    private static class VenomHandler implements Handler {
 
        @Override
        public void handle(Request request,
                           VResponse response,
                           Scheduler scheduler,
                           Session session,
                           Worker worker) {
 
            String about = response.getJsoup().select(".sub-title b").text();
            System.out.println("ABOUT: " + about);
 
        }
 
    }
 
    public static void main(String[] args) throws Exception {
        try (Crawler c = Crawler.buildDefault().start()) {
            Request r = new VRequest("https://venom.preferred.ai");
            c.getScheduler().add(r, new VenomHandler());
        }
    }
 
}

License

Apache License 2.0

venom's People

Contributors

eriks22 avatar lwj5 avatar sitfoxfly avatar tqtg avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

venom's Issues

Wrong base URL returned for redirected links

Describe the bug
When venom reaches 403 links and follows the redirection it returns a base URL in the response using the original request URL.

  1. The base URL should instead be extracted from HttpContext context in AsyncResponseConsumer.
    In context, there is a key-value pair with the key http.target_host that contains the final base URL.

  2. The response should also return a response URL using the last URL provided in context with the key http.protocol.redirect-locations. Should there be no redirection, the URL should remain as the requested.

To Reproduce
Crawl https://techfest.preferred.ai which will provide a 403 redirect.

Expected behavior
Return the base URL based on the final address and a response URL based on the final address.

Desktop (please complete the following information):

  • OS: All
  • Version 4.2.6

Additional context
Add any other context about the problem here.

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.