downloader

package
v0.0.0-...-ea708a5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package downloader implements downloading from the osu! website, through, well, mostly scraping and dirty hacks.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRedirect = errors.New("cheesegull/downloader: no redirect happened, beatmap could not be downloaded")

ErrNoRedirect is returned from Download when we were not redirect, thus indicating that the beatmap is unavailable.

Functions

func SetBmsOsuKey

func SetBmsOsuKey(key string)

SetBmsOsuKey describes special_key for bms_osu.kotworks.cyou

func SetHostName

func SetHostName(host string)

SetHostName describes from which host i want download

Types

type Client

type Client http.Client

Client is a wrapper around an http.Client which can fetch beatmaps from the osu! website.

func LogIn

func LogIn(username, password string) (*Client, error)

LogIn logs in into an osu! account and returns a Client.

func (*Client) Download

func (c *Client) Download(setID int, noVideo bool) (io.ReadCloser, error)

Download downloads a beatmap from the osu! website. noVideo specifies whether we should request the beatmap to not have the video.

func (*Client) HasVideo

func (c *Client) HasVideo(setID int) (bool, error)

HasVideo checks whether a beatmap has a video.

Jump to

Keyboard shortcuts

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