Which is more advacned and good to use BaseSpider or CrawlSpider

576 views
Skip to first unread message

Pandu

unread,
Dec 17, 2012, 1:39:33 AM12/17/12
to scrapy...@googlegroups.com
I just wanted to know that which is more advanced and good for using in production BaseSpider or crawlSpider.

Whichever is best i will use that

Sanket Gupta

unread,
Dec 17, 2012, 1:50:24 AM12/17/12
to scrapy...@googlegroups.com
base spider and crawl spiders are different
base spider will generally be used to crawl a single page while crawlspider can be configured to extract links from the crawled pages and then crawl those pages


On Mon, Dec 17, 2012 at 12:09 PM, Pandu <dec.d...@gmail.com> wrote:
I just wanted to know that which is more advanced and good for using in production BaseSpider or crawlSpider.

Whichever is best i will use that

--
You received this message because you are subscribed to the Google Groups "scrapy-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/scrapy-users/-/1lPMqBDF3mcJ.
To post to this group, send email to scrapy...@googlegroups.com.
To unsubscribe from this group, send email to scrapy-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scrapy-users?hl=en.

Shane Evans

unread,
Dec 17, 2012, 5:53:29 AM12/17/12
to scrapy...@googlegroups.com
CrawlSpider extends BaseSpider and makes it more convenient to write certain types of spiders. If you crawl a single website and you need to follow some links which can be described using rules (mostly simple patterns), then CrawlSpider is a good option as it often requires less code. Otherwise, use BaseSpider.

Pandu

unread,
Dec 17, 2012, 7:38:06 AM12/17/12
to scrapy...@googlegroups.com
thanks shane,

I am searching for long time and i still have not been able to find a single EXAMPLE where i can use BaseSpider and which follows link. Are you same shane which is on stackoverflow . This was my question  http://stackoverflow.com/questions/13900877/scrapy-not-working-with-return-and-yield-together

where i used InitSpider and no has answered that

Crawling single page is ok with baseSpider but i am not able to get how to follow the links from there because i have to return either request or item and then one more yield fro following links.

Just give some  simple logic of following the links  with BaseSpider

Otherwise i have to use crawlSpider
Reply all
Reply to author
Forward
0 new messages