mirror of https://github.com/scrapy/scrapy.git
Allow comma-separated values in the rel tag
Comma-separated `rel` values are often seen in the wild, because Google allows it (see https://developers.google.com/search/docs/advanced/guidelines/qualify-outbound-links).
This commit is contained in:
parent
94baa4b272
commit
1ba0f68483
|
|
@ -138,7 +138,7 @@ def md5sum(file):
|
|||
|
||||
def rel_has_nofollow(rel):
|
||||
"""Return True if link rel attribute has nofollow type"""
|
||||
return rel is not None and 'nofollow' in rel.split()
|
||||
return rel is not None and 'nofollow' in rel.replace(',', ' ').split()
|
||||
|
||||
|
||||
def create_instance(objcls, settings, crawler, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in New Issue