Example #1
0
 def parse(self, response):
     hxs = HtmlXPathSelector(response=response)
     for sel in hxs.select('//div[@class="speaker_container"]'):
         il = SpeakerLoader(selector=sel)
         il.add_xpath("name", './/div[@class="speaker_name"]/text()')
         il.add_xpath("image", './/div[@class="speaker_image"]/img/@src')
         il.add_xpath("description", './/div[@class="speaker_description"]/*')
         yield il.load_item()
Example #2
0
 def parse(self, response):
     hxs = HtmlXPathSelector(response=response)
     for sel in hxs.select('//div[@id="speakers_list"]//div[@class="row-fluid"]'):
         il = SpeakerLoader(selector=sel)
         il.add_xpath('name', './/div/h2')
         il.add_xpath('image_urls', './/ul[@class="thumbnails"]//img/@src')
         il.add_xpath('description', './/div/p')
         yield il.load_item()