Skip to content

Multiple crawls with the same crawler #1587

New issue

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

Closed
jdemaeyer opened this issue Nov 9, 2015 · 2 comments · Fixed by #6040
Closed

Multiple crawls with the same crawler #1587

jdemaeyer opened this issue Nov 9, 2015 · 2 comments · Fixed by #6040
Labels

Comments

@jdemaeyer
Copy link
Contributor

While we don't support using the same crawler for multiple spiders, it is currently possible to run the same crawler (with the same spider) twice, possibly with different spider arguments. I.e., this works:

crawler = Crawler(myspidercls)
crawler.crawl(my_sparg='blah')
crawler.crawl(my_sparg='other_blah')

This is done in some of our tests (1, 2, 3). Are these tests legacy code or is support for multiple crawls part of the public API (see also this discussion)?

@nramirezuy
Copy link
Contributor

@jdemaeyer pretty sure is legacy code. We should remove those tests to avoid confusion.

@wRAR
Copy link
Member

wRAR commented Nov 17, 2022

I think we can deprecate running crawl() for the second time after the first one finishes (they can't be run concurrently already).

As for tests I'm sure it's just a shortcut, not something written explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants