Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/Fefefo/anime-themes-scraper

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Fefefo/anime-themes-scraper

  • v0.0.0-20210706125932-39f906987b7c
  • Source
  • Go
  • Socket score

Version published
Created
Source

Golang scraper for the /r/AnimeThemes

A scraping tool for Gophers which scrapes /r/AnimeThemes, a simple and consistent repository of anime opening and ending themes.

It uses Colly.

Installation

go get github.com/Fefefo/anime-themes-scraper

Project using this repo

  • fefegobot Telegram bot where you can inline search any opening by english or japanese title

Structs

// Anime is the struct which cointains the information about an anime
type Anime struct {
	IDAnime int
	Year    int
	NameJap string
	NameEng string
	MalLink string
	//ImageURL string
	Songs []animeSong
}

// animeSong is the stroct which contains the information about a theme
type animeSong struct {
	Title    string
	Link     string
	Version  string
	Episodes string
	Notes    string
}

// List is the struct wihich contains all the animes
type List []Anime

Example

func main() {
  //To put into list all the animes and their songs
  list := scraper.GetAnimeList()
  
  //To select only the animes which contains "Assassination Classroom"
  list = list.SelectByBothNames("Assassination Classroom")

  //To output the link of the first theme of the first anime selected
  fmt.Println(list[0].Songs[0].Link)
}
  /*
    OUTPUT

    https://animethemes.moe/video/AnsatsuKyoushitsu-OP1.webm
    
  */

FAQs

Package last updated on 06 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc