Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
follow_all with an empty list of urls fails with ValueError('Please supply exactly one of the following arguments: urls, css, xpath')
follow_all
ValueError('Please supply exactly one of the following arguments: urls, css, xpath')
What I would expect instead is just an empty generator of requests.
class Spider(scrapy.Spider): def parse(self, response): yield from response.follow_all([], self.parse)
Expected behavior:
No error is raised
Actual behavior:
ValueError('Please supply exactly one of the following arguments: urls, css, xpath') exception is raised.
2.0
I think the solution is just a matter of changing this line: https://github.com/scrapy/scrapy/blob/master/scrapy/http/response/text.py#L191
The text was updated successfully, but these errors were encountered:
Scrapy 2.0 books_06 example. Much less boilerplate.
c7391dd
Note that it fails due to the reported issue scrapy/scrapy#4408
elacuesta
Successfully merging a pull request may close this issue.
Description
follow_all
with an empty list of urls fails withValueError('Please supply exactly one of the following arguments: urls, css, xpath')
What I would expect instead is just an empty generator of requests.
Steps to Reproduce
Expected behavior:
No error is raised
Actual behavior:
ValueError('Please supply exactly one of the following arguments: urls, css, xpath')
exception is raised.Versions
2.0
Additional context
I think the solution is just a matter of changing this line: https://github.com/scrapy/scrapy/blob/master/scrapy/http/response/text.py#L191
The text was updated successfully, but these errors were encountered: