parsers/wikipedia: Fix HTTP(S) URL filter logic.

develop
Icedream 2016-07-03 19:03:32 +02:00
parent 6de3faa8e0
commit f97c872b2e
1 changed files with 2 additions and 2 deletions

View File

@ -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