Go to file
SoXX 98558dcfbf feat: save to json
added the ability to save the output as json
2024-08-09 12:05:18 +02:00
pkg/furaffinaty feat: submission url 2024-08-09 12:04:57 +02:00
.gitignore feat: initial commit 2024-08-06 15:32:42 +02:00
go.mod feat: initial commit 2024-08-06 15:32:42 +02:00
go.sum feat: initial commit 2024-08-06 15:32:42 +02:00
main.go feat: save to json 2024-08-09 12:05:18 +02:00
README.md docs: initial commit 2024-08-06 15:45:03 +02:00

Go-Furaffinity-SDK


IMPORTANT: THIS IS JUST A PROOF OF CONCEPT AT THE MOMENT

This SDK misses many features and is not optimized in any way. Please use it with caution!


This is a Go SDK for interacting with Furaffinity. It provides functionalities to parse dates, handle cookies, and fetch submission data from Furaffinity.

Directory Structure

The project is organized into several packages:

  • furaffinaty: Contains the main client for interacting with Furaffinity.
  • models: Defines the data structures used in the project.
  • utils: Provides utility functions such as date parsing.

Usage

First, initialize a new Furaffinity client with your username and cookies:

cookies := models.Cookie{
    A: os.Getenv("COOKIE_A"),
    B: os.Getenv("COOKIE_B"),
}

collyOptions := []colly.CollectorOption{
    colly.Debugger(&debug.LogDebugger{}),
}

faClient := furaffinaty.NewClient("YourUsername", cookies, collyOptions)

You can then use the client to fetch submission IDs:

SubmissionIDs, err := faClient.GetSubmissionIDs()
if err != nil {
    log.Fatal(err)
}

And fetch submissions:

submissions, err := faClient.GetSubmissions(1) // Fetch 1 submission
if err != nil {
	log.Fatal(err)
}

Dependencies

This project uses the following dependencies:

  • github.com/gocolly/colly/v2: For web scraping.
  • github.com/davecgh/go-spew/spew: For pretty-printing variables for debugging.
  • github.com/joho/godotenv/autoload: For loading environment variables from a .env file.

Environment Variables

The project uses the following environment variables:

  • COOKIE_A: Your Furaffinity cookie A.
  • COOKIE_B: Your Furaffinity cookie B.

These should be set in your environment or in a .env file in the root directory of the project.