Skip to content

Commit

Permalink
[extractor:iwara] updated tests and extended some regex
Browse files Browse the repository at this point in the history
  • Loading branch information
gan-of-culture committed Jul 31, 2023
1 parent d84035d commit 6ed68f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extractors/iwara/iwara.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (e *extractor) Extract(URL string) ([]*static.Data, error) {
}

func parseURL(URL string) []string {
if ok, _ := regexp.MatchString(site+`(?:video|image)/`, URL); ok {
if ok, _ := regexp.MatchString(`https://[w.]*iwara.tv/(?:video|image)/`, URL); ok {
return []string{URL}
}

Expand Down
6 changes: 3 additions & 3 deletions extractors/iwara/iwara_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ func TestExtract(t *testing.T) {
{
Name: "Single video",
Args: test.Args{
URL: "https://iwara.tv/video/1ye3vfv2bpfmpe0k2",
Title: "女武神的日常",
URL: "https://www.iwara.tv/video/jemn7sgm7wuw0oqv9/r-18-observation-diary",
Title: "【R-18】電ちん観察日記 OBSERVATION DIARY",
Quality: "Source",
Size: 306465871,
Size: 232156387,
},
},
{
Expand Down

0 comments on commit 6ed68f4

Please sign in to comment.