Skip to content

Commit

Permalink
[extractor:pururin] update regex and cdn URL
Browse files Browse the repository at this point in the history
  • Loading branch information
gan-of-culture committed Jul 31, 2023
1 parent b7e3587 commit d84035d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion extractors/pururin/pururin.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ func parseURL(URL string) []string {
if err != nil {
return []string{}
}
htmlString = strings.Split(htmlString, "Popular right now")[0]

re := regexp.MustCompile(fmt.Sprintf("%sgallery/\\d*/[^\"]*\">", site))
re := regexp.MustCompile(fmt.Sprintf(`%sgallery/\d+/[^\"]*\"`, site))

URLs := []string{}
for _, v := range re.FindAllString(htmlString, -1) {
Expand Down
2 changes: 1 addition & 1 deletion extractors/pururin/pururin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestParseURL(t *testing.T) {
}, {
Name: "Tag",
URL: "https://pururin.to/browse/tags/contents/1563/stockings.html",
Want: 20,
Want: 25,
},
}
for _, tt := range tests {
Expand Down

0 comments on commit d84035d

Please sign in to comment.