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)
}