def _parse_2014(self, response):
     for section in Selector(response).xpath("//div[@class='sched-person']"):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', "./h2/a")
         il.add_value('conference', str(response.meta['conference']))
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#2
0
 def parse_speakers(self, response):
     sel = Selector(response)
     for speaker_div in sel.xpath("//div[contains(@class, 'speaker')]"):
         loader = SpeakerLoader(selector=speaker_div)
         loader.add_xpath('name', ".//h5/a[@target='_blank']/text()")
         loader.add_value('year', str(response.meta['year']))
         yield loader.load_item()
 def _parse_2013(self, response):
     for section in Selector(response).xpath("//div[@class='data-mid2']/h2[1]/a[1]"):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', ".")
         il.add_value('conference', str(response.meta['conference']))
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#4
0
 def _parse_2010(self, response):
     for section in Selector(response).xpath('//div[@class="proposal_list_summary"]'):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', './span[1]')
         il.add_value('year', str(response.meta['year']))
         il.add_value('conference', 'PyCon US')
         yield il.load_item()
示例#5
0
 def _parse_2013(self, response):
     for section in Selector(response).xpath(
             "//div[contains(@class,'speaker')]"):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', "./a[@class='name']")
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#6
0
 def _parse_2006(self, response):
     sel = Selector(response)
     for name in sel.xpath('//div[@id="content"]/p[strong]/following-sibling::*[1]'):
         il = SpeakerLoader(selector=name)
         il.add_xpath('name', '.')
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#7
0
 def parse_speakers(self, response):
     sel = Selector(response)
     for speaker_div in sel.xpath("//div[contains(@class, 'speaker')]"):
         loader = SpeakerLoader(selector=speaker_div)
         loader.add_xpath("name", ".//h5/a[@target='_blank']/text()")
         loader.add_value("year", str(response.meta["year"]))
         yield loader.load_item()
示例#8
0
 def _parse_video(self, response):
     for section in Selector(response).xpath(
             "//div[@class = 'videos']//div[@class = 'presenters']/a"):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', ".")
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
 def _parse_video(self, response):
     for section in Selector(response).xpath("//div[@class = 'videos']//div[@class = 'presenters']/a"):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', ".")
         il.add_value('conference', str(response.meta['conference']))
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#10
0
 def _parse(self, response):
     for section in Selector(response).xpath(
             '//div[@class="speakers"]//div[@class="name"]'):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', '.')
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#11
0
 def _parse_2014(self, response):
     for section in Selector(response).xpath(
             "//div[@class='sched-person']"):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', "./h2/a")
         il.add_value('conference', str(response.meta['conference']))
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#12
0
 def _parse_2013(self, response):
     for section in Selector(response).xpath(
             "//div[@class='data-mid2']/h2[1]/a[1]"):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', ".")
         il.add_value('conference', str(response.meta['conference']))
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#13
0
 def _parse_2006(self, response):
     sel = Selector(response)
     for name in sel.xpath('//div[@id="content"]/p[strong]/following-sibling::*[1]'):
         il = SpeakerLoader(selector=name)
         il.add_xpath('name', '.')
         il.add_value('year', str(response.meta['year']))
         il.add_value('conference', 'PyCon US')
         yield il.load_item()
 def _follow_sessions(self, response):
     for speaker in Selector(response).xpath("//a[contains(@href, 'speakerDetail.ww')]"):
         il = SpeakerLoader(selector=speaker)
         il.add_xpath('name', "./text()")
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
 def _parse_2013(self, response):
     for section in Selector(response).xpath("//div[contains(@class,'speaker')]"):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', "./a[@class='name']")
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#16
0
 def _parse(self, response):
     for section in Selector(response).xpath('//div[@class="speakers"]//div[@class="name"]'):
         il = SpeakerLoader(selector=section)
         il.add_xpath('name', '.')
         il.add_value('year', str(response.meta['year']))
         yield il.load_item()
示例#17
0
 def _follow_speakers(self, response):
     il = SpeakerLoader(response=response)
     il.add_xpath('name', "//a[contains(@href, '/speaker/profile/')]")
     il.add_value('year', str(response.meta['year']))
     yield il.load_item()
示例#18
0
 def _follow_speakers(self, response):
     il = SpeakerLoader(response=response)
     il.add_xpath('name', "//a[contains(@href, '/speaker/profile/')]")
     il.add_value('year', str(response.meta['year']))
     il.add_value('conference', 'PyCon US')
     yield il.load_item()