Git Product home page Git Product logo

ethereum-address-scraper's Introduction

Ethereum Address Scraper

Try it here: https://ethereum-address-scraper.web.app/

Overview

The /scrape API is a web scraping endpoint built using Go and the Gin framework. It allows users to send a list of target URLs and retrieves Ethereum addresses from the HTML content and associated script files of those URLs. The API ensures that script URLs are processed only if their top-level domain matches the top-level domain of the target URL.

Features

  • Accepts a list of target URLs via a POST request or CLI.
  • Fetches HTML content and associated scripts from each target URL.
  • Extracts Ethereum addresses from both HTML content and script content.
  • Ensures that script URLs are processed only if their top-level domain matches the target URL's top-level domain.
  • Returns a flat list of unique Ethereum addresses with their sources (HTML or script) and associated target URLs.

Dependencies

go get github.com/gin-gonic/gin
go get github.com/weppos/publicsuffix-go/publicsuffix

Run via CLI

go run scraper-main/main.go https://example.com https://anotherexample.com

Run via webserver

go run api-main/main.go

Endpoint

POST /scrape

Request

  • URL: /scrape
  • Method: POST
  • Content-Type: application/json
  • Body:
    • targets: An array of strings, each representing a URL to be scraped. All URLs must start with http:// or https://.

Response

  • Content-Type: application/json
  • Body:
    • message: A message indicating the status of the request.
    • results: An array of objects, each representing a unique Ethereum address found during the scraping process.
      • address: The Ethereum address.
      • src: The source URL where the address was found (either the HTML content or a script URL).
      • type: The type of content where the address was found (html or script).
      • targets: An array of target URLs that contain the address.

ethereum-address-scraper's People

Contributors

pepewitch avatar

Watchers

 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.