mirror of https://github.com/scrapy/scrapy.git
strip URL extracted from selectors (as per html5 standard)
This commit is contained in:
parent
877057fac0
commit
71dd5d0bf9
|
|
@ -142,10 +142,9 @@ class TextResponse(Response):
|
|||
if isinstance(url, Link):
|
||||
url = url.url
|
||||
elif isinstance(url, parsel.Selector):
|
||||
url = _url_from_selector(url)
|
||||
url = _url_from_selector(url).strip()
|
||||
elif isinstance(url, parsel.SelectorList):
|
||||
raise ValueError("Please pass either string")
|
||||
|
||||
raise ValueError("SelectorList is not supported")
|
||||
|
||||
encoding = self.encoding if encoding is None else encoding
|
||||
url = self.urljoin(url)
|
||||
|
|
|
|||
Loading…
Reference in New Issue