Skip to content
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

Hookable/eventable crawler behavior #6

Open
kix opened this issue Dec 15, 2014 · 1 comment
Open

Hookable/eventable crawler behavior #6

kix opened this issue Dec 15, 2014 · 1 comment

Comments

@kix
Copy link
Contributor

kix commented Dec 15, 2014

Maybe this should be opened against the crawler component, but this looks like an application-wide feature.

We could trigger application-wide events during the crawler's lifecycle when a request is initiated, when a URL is discovered, when a response is retrieved, etc.
This would allow us to implement:

  • Clever and clean output handling (pretty much in @everzet's Behat way, though I'm not suggesting to use decorators)
  • Passing request/response data to pluggable event listeners. Imagine if we're getting a 500 from a Symfony2 app and this is caught by an event handler that sends an email to the developer, with a profiler link attached.
  • Passing the whole list of URLs discovered during a run to some kind of listener, to make sure that we don't return 404's for pages that are linked from Google search

And I'm sure there's more use cases.

@umpirsky
Copy link
Owner

Yes, having this in crawler is good idea, Thanks @kix! 👍

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

No branches or pull requests

2 participants