Coder Social home page Coder Social logo

nick-bigger / scraper Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5 KB

scraper is a multi-threaded web crawler for gathering phone numbers or URLs. This is a rewrite/repurpose of Kuba Gretzky's dcrawl to additionally scrape phone numbers.

License: MIT License

Go 100.00%

scraper's Introduction

scraper

scraper is a multi-threaded web crawler for gathering phone numbers or URLs. This is a rewrite/repurpose of Kuba Gretzky's dcrawl to additionally scrape phone numbers.

How it works?

scraper reads in a file of URLs and scrapes the site's body for either phone numbers or URLs. For phone numbers, it uses a simple regex. For URLs, it scans each site for <a href=...> links in the site's body.

  • Crawls only sites that return text/html Content-Type in HEAD response.
  • Retrieves site body of maximum 1MB size.
  • Does not save inaccessible domains.
  • Ignores duplicate domains.

How to run?

go build
./scraper -in input.csv -out output.csv -urls

Usage

   ____________  ___   ___  _______ 
  / __/ ___/ _ \/ _ | / _ \/ __/ _ \
 _\ \/ /__/ , _/ __ |/ ___/ _// , _/
/___/\___/_/|_/_/ |_/_/  /___/_/|_| 
                              v.1.0

usage: ./scraper -in INPUT_FILE -out OUTPUT_FILE -urls|-phone_numbers

  -in string
        input file to read URLs from
  -out string
        output file to save scraped data to
  -urls bool
        tells scraper to scrape for URLs
  -phone_numbers bool
        tells scraper to scrape for phone numbers
  -t int
        number of concurrent threads (default 8)
  -v bool
        verbose (default false)

License

dcrawl was made by Kuba Gretzky from breakdev.org and released under the MIT license. This rewrite/repurpose was made by Nick bigger and maintains the same MIT license.

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.