mirror of https://github.com/scrapy/scrapy.git
Removed silly bug from the previous revision
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40460
This commit is contained in:
parent
a4ba7b9d9a
commit
068d2278a3
|
|
@ -44,7 +44,7 @@ class LinkExtractor(FixedSGMLParser):
|
|||
base_url = self.base_url if self.base_url else response.url
|
||||
ret = []
|
||||
for link in self.links:
|
||||
link.url = urljoin(base_url, link.url)
|
||||
link.url = urljoin(base_url, link.url).strip()
|
||||
ret.append(link)
|
||||
return ret
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class RegexLinkExtractor(LinkExtractor):
|
|||
response = new_response_from_xpaths(response, self.restrict_xpaths)
|
||||
|
||||
links = LinkExtractor.extract_urls(self, response, unique)
|
||||
links = [link.strip() for link in links if _is_valid_url(link.url)]
|
||||
links = [link for link in links if _is_valid_url(link.url)]
|
||||
|
||||
if self.allow_res:
|
||||
links = [link for link in links if _matches(link.url, self.allow_res)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue