fourscrape

package module
v0.0.0-...-7de4bee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 6 Imported by: 0

README

moonarch

A neat wrapper around the 4chan API for content scraping.

How-To

First, get the repository: go get github.com/lazdotdigital/fourscrape. fourscrape only exposes a single function: Scrape.

Scrape takes two arguments, board, regex string.

  • First, all of the comments on board will be retrieved.
  • Second, all comments that match regex will be returned.

Below is a simple example showing how to use fourscrape to get all hex addresses on biz.

package main

import (
    "fmt"

    "github.com/lazdotdigital/fourscrape"
)

func main() {
    addresses, err := fourscrape.Scrape("biz", "0[xX][0-9a-fA-F]+")
    if err != nil {
        panic(err)
    }
    fmt.Println(addresses)
}

Documentation

Overview

Package fourscrape provides a neat wrapper around the 4chan API, used to scrape content from comments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scrape

func Scrape(board, regex string) ([]string, error)

Scrape will fetch all comments from the first ten pages of board, and will return all comments that match regex.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL