parsers/wikipedia: Fix HTTP(S) URL filter logic.
parent
6de3faa8e0
commit
f97c872b2e
|
@ -23,8 +23,8 @@ func (p *Parser) Init() error {
|
|||
}
|
||||
|
||||
func (p *Parser) Parse(u *url.URL, referer *url.URL) (result parsers.ParseResult) {
|
||||
if !strings.EqualFold(u.Scheme, "http") ||
|
||||
!strings.EqualFold(u.Scheme, "https") ||
|
||||
if !(strings.EqualFold(u.Scheme, "http") ||
|
||||
strings.EqualFold(u.Scheme, "https")) ||
|
||||
(!strings.HasSuffix(strings.ToLower(u.Host), ".wikipedia.org") &&
|
||||
!strings.EqualFold(u.Host, "wikipedia.org")) {
|
||||
result.Ignored = true
|
||||
|
|
Loading…
Reference in New Issue