Skip to content

Commit

Permalink
extractors/bilibili: handle the situation that the season_type is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
iawia002 committed Jan 17, 2019
1 parent 4f3094e commit 5017049
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extractors/bilibili/bilibili.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func bilibiliDownload(url string, options bilibiliOptions) downloader.Data {
}
var seasonType string
if options.Bangumi {
seasonType = utils.MatchOneOf(html, `"season_type":(\d+)`)[1]
seasonType = utils.MatchOneOf(html, `"season_type":(\d+)`, `"ssType":(\d+)`)[1]
}

// Get "accept_quality" and "accept_description"
Expand Down
6 changes: 3 additions & 3 deletions extractors/bilibili/bilibili_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func TestBilibili(t *testing.T) {
{
name: "bangumi test",
args: test.Args{
URL: "https://www.bilibili.com/bangumi/play/ep167000",
Title: "狐妖小红娘:第70话 苏苏智商上线",
Quality: "高清 1080P",
URL: "https://www.bilibili.com/bangumi/play/ep167000",
Title: "狐妖小红娘:第70话 苏苏智商上线",
// Quality: "高清 1080P",
},
},
{
Expand Down

0 comments on commit 5017049

Please sign in to comment.