crawly
crawly copied to clipboard
Provide more examples / detailed docs on custom request header override per spider
I have a situation where I need to supply a custom consent cookie to a specific spider. While it is described how to do it for the middleware, it is not very clear still how to pass e.g. custom headers to the init/1
callback of Crawly.Spider
.
Even a small example or such will help and can help with writing a good example in docs, thanks!
Why not use start_requests:
?
https://github.com/elixir-crawly/crawly/blob/c02e408dc84754bf8903515a9906c36ee51d04c0/test/manager_test.exs#L165
https://hexdocs.pm/crawly/basic_concepts.html#behaviour-functions
- [ ] add in examples
- [ ] add to https://hexdocs.pm/crawly/basic_concepts.html#behaviour-functions, link to callback docs
- [ ] add to https://hexdocs.pm/crawly/Crawly.Spider.html#c:init/1 , main doc reference.