Beispiel #1
0
 def extract_expiry(spider,hxs,response):
     scripts = data_extractor.extractXpath(hxs,"//script",None);
     if scripts:
         timeleft = int(re.findall('(?<=time_left":)\d+',scripts)[0]) / 1000
         if timeleft:
             return expiry_resolver.from_timeleft(secondsleft=int(timeleft))
 def extract_expiry(spider,hxs,response):
     secsLeft = data_extractor.extractNumericXpath(hxs,"//span[@class='js-time hide']//text()")
     print '\n\n\n\nsecs left: ',secsLeft,' current time: ',time.time()
     print '  expiry:: ',secsLeft+time.time(),'\n\n\n'
     return expiry_resolver.from_timeleft(secondsleft=secsLeft)
 def extract_expiry(spider,hxs,response):
     script = data_extractor.extractXpath(hxs,"//script",None);
     if script:
         timeleft = int(re.findall("(?<=\.countdown\(\{until: \'\+)\d+",script)[0])
         if timeleft:
             return expiry_resolver.from_timeleft(secondsleft=int(timeleft))
Beispiel #4
0
 def extract_expiry(spider,hxs,response):
     seconds = data_extractor.extractXpath(hxs,"//input[@name='deal_time_left']/@value",None);
     if seconds:
             return expiry_resolver.from_timeleft(secondsleft=int(seconds))