yyets

package
v0.0.0-...-ee1e291 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeedURL     = "http://rss.rrys.tv/rss/feed/"
	SearchURL   = "http://pc.zmzapi.com/index.php?g=api/pv2&m=index&a=search&accesskey=519f9cab85c8059d17544947k361a827&limit=200&k="
	DetailURL   = "http://pc.zmzapi.com/index.php?g=api/pv2&m=index&a=resource&accesskey=519f9cab85c8059d17544947k361a827&id="
	LoginURL    = "http://www.zmz2019.com/User/Login/ajaxLogin"
	FavURL      = "http://www.zmz2019.com/user/fav"
	ResourceURL = "http://www.zmz2019.com/resource/"
	UserAgent   = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Description string  `xml:"description"`
	Link        string  `xml:"link"`
	Title       string  `xml:"title"`
	Item        []*Item `xml:"item"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) GetDetail

func (c *Client) GetDetail(resourceID string) (*Detail, error)

func (*Client) ParseRssURL

func (c *Client) ParseRssURL(url string) (*Feed, error)

func (*Client) SetLogin

func (c *Client) SetLogin(username, password string)

func (*Client) UserFavs

func (c *Client) UserFavs() ([]string, error)

type Detail

type Detail struct {
	ID            string `json:"id"`
	Cnname        string `json:"cnname"`
	Enname        string `json:"enname"`
	Channel       string `json:"channel"`
	ChannelCN     string `json:"channel_cn"`
	Category      string `json:"category"`
	CloseResource string `json:"close_resource"`
	PlayStatus    string `json:"play_status"`
	Poster        string `json:"poster"`
	URL           string `json:"url"`
}

type Feed

type Feed struct {
	XMLName xml.Name `xml:"rss"`
	Channel Channel  `xml:"channel"`
}

type Item

type Item struct {
	Link          string    `xml:"link"`
	Title         string    `xml:"title"`
	Guid          string    `xml:"guid"`
	PubDate       string    `xml:"pubDate"`
	DateFormatted time.Time `xml:"date"`
	Magnet        string    `xml:"magnet"`
	Ed2k          string    `xml:"ed2k"`
}

Jump to

Keyboard shortcuts

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