Skip to content

Commit

Permalink
2023/9/2更新
Browse files Browse the repository at this point in the history
  • Loading branch information
pingc0y committed Sep 2, 2023
1 parent 3f0d497 commit 426d37b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions crawler/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ func jsFilter(str [][]string) [][]string {
str[i][0] = strings.Replace(str[i][0], "\\/", "/", -1)
str[i][0] = strings.Replace(str[i][0], "%3A", ":", -1)
str[i][0] = strings.Replace(str[i][0], "%2F", "/", -1)
str[i][0] = strings.Replace(str[i][0], "./", "/", -1)
//去除不是.js的链接
if !strings.HasSuffix(str[i][0], ".js") && !strings.Contains(str[i][0], ".js?") {
str[i][0] = ""
Expand Down Expand Up @@ -51,7 +50,6 @@ func urlFilter(str [][]string) [][]string {
str[i][0] = strings.Replace(str[i][0], "\\/", "/", -1)
str[i][0] = strings.Replace(str[i][0], "%3A", ":", -1)
str[i][0] = strings.Replace(str[i][0], "%2F", "/", -1)
str[i][0] = strings.Replace(str[i][0], "./", "/", -1)
//去除不存在字符串和数字的url,判断为错误数据
match, _ := regexp.MatchString("[a-zA-Z]+|[0-9]+", str[i][0])
if !match {
Expand Down

0 comments on commit 426d37b

Please sign in to comment.