Skip to content

Commit

Permalink
feat: support bilibili b23.tv domain (#1287)
Browse files Browse the repository at this point in the history
* feat: support bilibili b23.tv domain

* Use the same instance

---------

Co-authored-by: Xinzhao Xu <[email protected]>
  • Loading branch information
long2ice and iawia002 committed Oct 23, 2023
1 parent ef26fad commit d529cbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extractors/bilibili/bilibili.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import (
)

func init() {
extractors.Register("bilibili", New())
bilibiliExtractor := New()
extractors.Register("bilibili", bilibiliExtractor)
extractors.Register("b23", bilibiliExtractor)
}

const (
Expand Down
7 changes: 7 additions & 0 deletions extractors/bilibili/bilibili_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ func TestBilibili(t *testing.T) {
Title: "【8K演示片】B站首发!你的设备还顶得住吗?",
},
},
{
name: "b23 test",
args: test.Args{
URL: "https://b23.tv/Fc9i7QF",
Title: "【十年榜】2000-2009年最强华语金曲TOP100 P1 100爱转角-罗志祥",
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit d529cbb

Please sign in to comment.