This commit is contained in:
parent
43ff697450
commit
adf418f016
@ -52,6 +52,9 @@ func (c *Client) GetSubtitles(url string) (string, error) {
|
||||
break
|
||||
}
|
||||
}
|
||||
if subTitlesUrl == "" {
|
||||
return "", fmt.Errorf("没有找到字幕")
|
||||
}
|
||||
subtitles, err := c.callSubtitles(subTitlesUrl)
|
||||
if err != nil {
|
||||
return "", err
|
||||
@ -124,6 +127,8 @@ func parseBilibiliUrl(bu string) (vid string, page int, err error) {
|
||||
if query.Get("p") != "" {
|
||||
pageStr := query.Get("p")
|
||||
page, _ = strconv.Atoi(pageStr)
|
||||
} else {
|
||||
page = 1
|
||||
}
|
||||
return vid, page, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user