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) {
|
func (p *Parser) Parse(u *url.URL, referer *url.URL) (result parsers.ParseResult) {
|
||||||
if !strings.EqualFold(u.Scheme, "http") ||
|
if !(strings.EqualFold(u.Scheme, "http") ||
|
||||||
!strings.EqualFold(u.Scheme, "https") ||
|
strings.EqualFold(u.Scheme, "https")) ||
|
||||||
(!strings.HasSuffix(strings.ToLower(u.Host), ".wikipedia.org") &&
|
(!strings.HasSuffix(strings.ToLower(u.Host), ".wikipedia.org") &&
|
||||||
!strings.EqualFold(u.Host, "wikipedia.org")) {
|
!strings.EqualFold(u.Host, "wikipedia.org")) {
|
||||||
result.Ignored = true
|
result.Ignored = true
|
||||||
|
|
Loading…
Reference in New Issue