Documentation
¶
Index ¶
- func SaveJSON(v interface{}, filename string) error
- type Douban
- type DoubanMovie
- type HLSM3u8
- type Kuwo
- type Netease
- func (n Netease) Album(album int) []Song
- func (n Netease) Artist(artistid int) []Song
- func (n Netease) LRC(songids []int) map[int]string
- func (n Netease) Playlist(playlistid int) []Song
- func (n Netease) Search(keyword string) []Song
- func (n Netease) Song(songids []int) map[int]Song
- func (n Netease) SongURL(songids []int) map[int]Song
- type ProxyPool
- type Song
- type Spider
- func (s *Spider) Download(savepath string) error
- func (s *Spider) DownloadHLSM3u8(h HLSM3u8, savepath string) error
- func (s *Spider) DownloadHLSM3u8FromURL(inurl, savepath string) error
- func (s *Spider) DownloadSong(song Song, savepath string) error
- func (s *Spider) Fetch() (*grequests.Response, error)
- func (s *Spider) FetchBytes() ([]byte, error)
- func (s *Spider) FetchHLSM3u8(inurl string) (h HLSM3u8, err error)
- func (s *Spider) JSON(userStruct interface{}) error
- type Video
- type WeChat
- type Zhihu
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DoubanMovie ¶
type DoubanMovie struct {
ID string `json:"id"`
Title string `json:"title"`
Cover string `json:"cover"`
Director string `json:"director"`
Author string `json:"author"`
Actor string `json:"actor"`
Genre string `json:"genre"`
Area string `json:"area"`
Language string `json:"language"`
DatePublished string `json:"datepublished"`
Duration string `json:"duration"`
Alias string `json:"alias"`
IMDb string `json:"imdb"`
Rate float64 `json:"rate"`
RatingCount int `json:"ratingcount"`
RatingWeight []float64 `json:"ratingweight"`
Tag []string `json:"tag"`
Recommend []string `json:"recommend"`
}
DoubanMovie DoubanMovie
type HLSM3u8 ¶
type HLSM3u8 struct {
URL string
SubURL []string
KeyMethod string
KeyURI string
Segment []string
Raw []byte
}
HLSM3u8 HLSM3u8
type Song ¶
type Song struct {
WebSite string `json:"website"`
Title string `json:"title"`
ID string `json:"id"`
Alias string `json:"alias"`
Artist string `json:"artist"`
URL string `json:"src"`
Cover string `json:"pic"`
Lyric string `json:"lrc"`
Album string `json:"album"`
ArtistID string `json:"artist_id,omitempty"`
AlbumID int `json:"albumid,omitempty"`
CoverImage []byte `json:"-"`
Year string `json:"year,omitempty"`
Publishtime string `json:"publishtime,omitempty"`
Lyclng string `json:"lyclng,omitempty"`
Lycdesc string `json:"lycdesc,omitempty"`
Track int `json:"track,omitempty"`
Size int `json:"size,omitempty"`
Encodetype string `json:"encodetype,omitempty"`
Basicrate int `json:"basicrate,omitempty"`
}
Song Song
type Spider ¶
type Spider struct {
Type string
URL string
UA string
Referer string
Params map[string]string
Proxy *url.URL
// contains filtered or unexported fields
}
func (*Spider) DownloadHLSM3u8 ¶
DownloadHLSM3u8 DownloadHLSM3u8
func (*Spider) DownloadHLSM3u8FromURL ¶
DownloadHLSM3u8FromURL DownloadHLSM3u8FromURL
func (*Spider) DownloadSong ¶
DownloadSong DownloadSong
func (*Spider) FetchHLSM3u8 ¶
FetchHLSM3u8 FetchHLSM3u8
type Video ¶
type Video struct {
Title string `json:"title"`
CoverURL string `json:"coverurl"`
PlayURL string `json:"playurl"`
Height int `json:"height"`
Width int `json:"width"`
Fps float64 `json:"fps"`
Duration float64 `json:"duration"`
Bitrate float64 `json:"bitrate"`
Size int `json:"size"`
Format float64 `json:"format"`
}
Video Video
Click to show internal directories.
Click to hide internal directories.