Skip to content

Commit

Permalink
extractors/bilibili: fix single bangumi download
Browse files Browse the repository at this point in the history
  • Loading branch information
iawia002 committed Mar 17, 2018
1 parent 493722b commit 6a0029d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions extractors/bilibili.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ func Bilibili(url string) {
if !config.Playlist {
options.HTML = html
data, err := getMultiPageData(html)
if err == nil {
// handle URL that has a playlist
if err == nil && !options.Bangumi {
// handle URL that has a playlist, mainly for unified titles
// bangumi doesn't need this
pageString := utils.MatchOneOf(url, `\?p=(\d+)`)
var p int
if pageString == nil {
Expand Down
1 change: 1 addition & 0 deletions extractors/bilibili_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func TestBilibili(t *testing.T) {
Bilibili(tt.args.URL)
// single mode
config.Playlist = false
Bilibili(tt.args.URL)
data = bilibiliDownload(tt.args.URL, options)
} else {
config.Playlist = false
Expand Down

0 comments on commit 6a0029d

Please sign in to comment.