Documentation ¶
Overview ¶
Package downloader implements downloading from the osu! website, through, well, mostly scraping and dirty hacks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
This section is empty.
Types ¶
type Client ¶
Client is a wrapper around an http.Client which can fetch beatmaps from the osu! website.
func LogIn ¶
func LogIn(username string, password string, requestPreparer LogInRequestPreparer) (*Client, error)
LogIn logs in into an osu! account and returns a Client.
type EmptyLogInRequestPreparer ¶
type EmptyLogInRequestPreparer struct{}
EmptyLogInRequestPreparer is a cookie preparer that returns an empty CookieJar
func (*EmptyLogInRequestPreparer) PrepareCookies ¶
func (*EmptyLogInRequestPreparer) PrepareCookies() (http.CookieJar, error)
PrepareCookies returns an empty cookie jar
func (*EmptyLogInRequestPreparer) PrepareHeaders ¶
func (*EmptyLogInRequestPreparer) PrepareHeaders() (map[string]string, error)
PrepareHeaders returns an empty map (i.e.: no additional headers)
type FckCf ¶
type FckCf struct { Address string // contains filtered or unexported fields }
FckCf is a LogInRequestPreparer that prepares cookies using FckCf
func (*FckCf) InitializeProxyResponse ¶
InitializeProxyResponse initializes the
func (*FckCf) PrepareCookies ¶
PrepareCookies calls FckCf and returns a CookieJar with the required cookies