How are you running it?
On Monday, December 23, 2013 4:55:47 PM UTC+5, [email protected] wrote: > > here is my spider > > from scrapy.spider import BaseSpider > from scrapy.selector import Selector > from sample1.items import mykartItem > > class mykartSpider(BaseSpider): > name = "mykart" > allowed_domains = ["flipkart.com"] > start_urls = > ["http://www.mykart.com/mobilesotracker=nmenu_sub_electronics_0_Mobiles"] > > def parse(self, xmlresponse): > sel = Selector(xmlresponse) > sites = > sel.xpath('//html/body/div/div[2]/div/div[2]/div[2]/div/div[2]') > items = [] > for site in sites: > item = mykartItem() > item['image'] = site.xpath('.//a/img/@src').extract() > item['price'] = site.xpath('.//span/text()').extract() > item['title'] = site.xpath('.//a/text()').extract() > item['link'] = site.xpath('.//a/@href').extract() > items.append(item) > return items > > items.py > > from scrapy.item import Item, Field > > class mykartItem(Item): > price = Field() > title = Field() > link = Field() > image = Field() > > here is my result > > [{"image": > ["http://img8a.flixcart.com/image/mobile/q/f/r/apple-iphone-5c-125x125-imadpnhyw2qnxkh5.jpeg", > > "http://img7a.flixcart.com/image/mobile/j/z/n/htc-one-max-125x125-imadqrqeyceghdba.jpeg", > " > > the whole result is in single row , i need column wise result what can i > do..thanks in advance > > -- You received this message because you are subscribed to the Google Groups "scrapy-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/scrapy-users. For more options, visit https://groups.google.com/groups/opt_out.
