Categorygithub.com/rl404/go-malscraper
modulepackage
1.2.20
Repository: https://github.com/rl404/go-malscraper.git
Documentation: pkg.go.dev

# README

Go-Malscraper

Github Test Coverage Go Report Card License: MIT Go Reference

go-malscraper is just another unofficial API which scraping/parsing MyAnimeList website to a useful and easy-to-use data by using Go.

Well, it is created to help people get MyAnimeList data without relying on MyAnimeList since they limited/disabled/closed their API. It's working as long as the web is up and the UI design stays the same so it can get the page sources and parse them.

go-malscraper is using PuerkitoBio's HTML DOM parser and inspired by Jikan's API library and my PHP Mal-Scraper library.

Looking for REST API one? come here.

Features

  • Get anime information (details, characters, episodes, pictures, etc)
  • Get manga information (details, characters, pictures, recommendations, etc)
  • Get character information (details, pictures, etc)
  • Get people information (details, pictures, etc)
  • Get list of all anime/manga's genres
  • Get list of all anime/manga's producers/studios/licensors/magazines/serializations
  • Get anime/manga's recommendations
  • Get anime/manga's reviews
  • Search anime, manga, character and people
  • Get seasonal anime list
  • Get anime, manga, character and people top list
  • Get user information (profile, friends, histories, recommendations, reviews, etc)
  • Get news list and details
  • Get featured article list and details
  • Get club list and details
  • Caching

More will be coming soon...

Installation

go get github.com/rl404/go-malscraper

Quick Start

package main

import (
    "fmt"
    mal "github.com/rl404/go-malscraper"
)

func main() {
    // Init with default config.
    m, err := mal.NewDefault()
    if err != nil {
        // handle error
    }

    // Don't forget to close.
    defer m.Close()

    // Parse anime ID 1.
    d, _, err := m.GetAnime(1)
    if err != nil {
        // handle error
    }

    // Use.
    fmt.Println(d.Title)
}

With Configuration

m, err := mal.New(mal.Config{
    CacheTime:     24 * time.Hour,
    CleanImageURL: true,
    CleanVideoURL: true,
    LogLevel:      mal.LevelTrace,
    LogColor:      true,
})

For more detail config and usage, please go to the documentation.

Disclamer

go-malscraper is meant for educational purpose and personal usage only. Although there is no limit in using the API, do remember that every scraper method is accessing MyAnimeList page so use it responsibly according to MyAnimeList's Terms Of Service.

All data (including anime, manga, people, etc) and MyAnimeList logos belong to their respective copyrights owners. go-malscraper does not have any affiliation with content providers.

License

MIT License

Copyright (c) 2021 Axel

# Packages

Package errors contains all errors returned by malscraper.
Package model contains all models for malscraper.
No description provided by the author
No description provided by the author

# Functions

New to create new malscraper with config.
NewDefault to quickly create new malscraper with default config.
NewNoCache to create new malscraper without caching.

# Constants

Club categories.
Club categories.
Main types.
Club categories.
Review types.
Main types.
Review types.
Club categories.
Club categories.
Club categories.
Club categories.
Season list.
Club categories.
Gender list.
Gender list.
Gender list.
Gender list.
Club categories.
debug, info, warning, error, fatal.
Default level.
error, fatal.
info, error, fatal.
trace, debug, info, warning, error, fatal.
no log.
Club categories.
Review types.
Main types.
Club categories.
User anime list order.
User anime list order.
User anime list order.
User anime list order.
User anime list order.
User anime list order.
User anime list order.
User anime list order.
User anime list order.
User anime list order.
User anime list order.
User anime list order.
User manga list order.
User manga list order.
User manga list order.
User manga list order.
User manga list order.
User manga list order.
User manga list order.
User manga list order.
User manga list order.
User manga list order.
Club categories.
Anime ratings.
all ages.
children.
teens 13 or older.
mild nudity.
17+ (violence & profanity).
hentai.
Club categories.
Club sorts.
Club sorts.
Club sorts.
Club sorts.
Club sorts.
Season list.
User list status.
User list status.
User list status.
User list status.
manga only.
User list status.
Anime & manga airing/publishing status.
manga only.
Anime & manga airing/publishing status.
User list status.
User list status.
Anime & manga airing/publishing status.
Season list.
Top anime types.
Top anime types.
Top manga types.
Top anime types.
Top manga types.
Top manga types.
Top manga types.
Top manga types.
Top anime types.
Top manga types.
Top anime types.
Top manga types.
Top anime types.
Top anime types.
Top manga types.
Top anime types.
Top anime types.
Top anime types.
Anime types.
Manga types.
Manga types.
Manga types.
Manga types.
Manga types.
Anime types.
Anime types.
Manga types.
Anime types.
Manga types.
Anime types.
Anime types.
Anime types.
Season list.

# Structs

Config is malscraper configuration.
Malscraper is malscraper instance which contains all methods to parse MyAnimeList web page.