Reputation: 1289
I'm VERY new to Python and I'm attempting to integrate Scrapy with Django.
Here is what I'm trying to make happen:
What is the best way to accomplish this? I've played with Django Dynamic Scraper, but I think I'm better off maintaining control over Scrapy for this.
Upvotes: 0
Views: 767
Reputation: 11396
holding on django request while scraping another website may not be the best idea, this flow is better done asynchronously, meaning, release django request and have another process to handle the scrapying, I guess its not an easy thing to achieve for newcomers, but try to bear with me.
flow should look like this:
shooting a scrapy spider can be done by launching it straight from python code, using a tool like celery, also see django and celery, or by launching it in a new process using python's subprocess
, or even better, using scrapyd to manage those spiders
Upvotes: 5