def parse_salon(self, response): sel = Selector(response) item = LocationHotelItem() item['page_url'] = self.get_property(sel, LocationHotelSelectors.CANONICAL_URL) or response.url item['name'] = self.get_property(sel, LocationHotelSelectors.NAME) item['name_kata'] = self.get_property(sel, LocationHotelSelectors.NAME_KATA) item['address'] = self.get_property(sel, LocationHotelSelectors.ADDRESS, clean=True) item['routes'] = LocationHotelSelectors.get_routes(sel) item['phone'] = LocationHotelSelectors.get_phone(sel) item['shop_url'] = LocationHotelSelectors.get_shop_url(sel) comment, credit_cards = LocationHotelSelectors.get_credit_cards(sel) item['credit_cards_comment'] = comment item['credit_cards'] = credit_cards prefecture, area = LocationHotelSelectors.get_prefecture_area(sel) item['prefecture'] = prefecture item['area'] = area item['genre'] = LocationHotelSelectors.get_genre(sel) checkin, checkout = LocationHotelSelectors.get_working_time(sel) item['checkin'] = checkin item['checkout'] = checkout item['kind'] = LocationHotelSelectors.get_hotel_type(sel) item['votes'] = LocationHotelSelectors.get_votes(sel) item['page_body'] = LocationHotelSelectors.get_body(sel) self.count += 1 # print "=" * 100 print u'%s: %s > %s -> %s' % (self.count, item['prefecture'], item['area'], item['name']) # for key, value in item.iteritems(): # print u'%s: %s' % (key, u'|'.join(value) if isinstance(value, (list, tuple)) else value) return item