You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scrapy offers an HTTP API through a third-party library called ScrapyRT, which exposes an HTTP API for spiders. By sending a request to ScrapyRT with the spider name and URL, you receive the items collected by the spider from that URL.
It would be great if Crawlee could provide similar functionality out of the box. Its like turning a website into realtime API.
I think it's pretty straightforward to expose the crawler.run method using FastAPI, for instance. The following snippet is without any guarantees, but it shouldn't be too incorrect 😄
Activity
janbuchar commentedon Jul 16, 2024
I think it's pretty straightforward to expose the
crawler.runmethod using FastAPI, for instance. The following snippet is without any guarantees, but it shouldn't be too incorrect 😄Note that this has to be run as a FastAPI app, e.g. with
fastapi run.It is possible that we will implement something even more streamlined in the future though, so feel free to throw ideas here.