docs: def fetch_data(self, stock_no, nowdatetime, firsttime = 1):
      """ Fetch data from twse.com.tw
          return list.
          從 twse.com.tw 下載資料，回傳格式為 list
      """
      url = 'http://www.twse.com.tw/ch/trading/exchange/STOCK_DAY/STOCK_DAY_print.php?genpage=genpage/Report%(year)d%(mon)02d/%(year)d%(mon)02d_F3_1_8_%(stock)s.php&type=csv&r=%(rand)s' % {'year': nowdatetime.year, 'mon': nowdatetime.month, 'stock': stock_no, 'rand': random.randrange(1,1000000)}
      self.debug_print(url)
      logging.info(url)
      #print cc.info().headers
  
      # set memcache expire
      now = TWTime().now
      if now >= datetime(now.year, now.month, now.day, 14, 45):
        addday = 1
      else:
        addday = 0
      endtime = datetime(now.year, now.month, now.day, 14, 00) + timedelta(days = addday) ## change from 13:35 to 14:00
      logging.info('endtime: %s' % str(endtime))
  
      if firsttime == 0:
        if endtime <= now:
          expire = 'ALUP' ## always update.
        else:
          expire = (endtime - now).seconds
      else:
        expire = 0 ## never expire.
      logging.info('expire: %s' % expire)
  
      ## get memcache
      memname = '%(stock)s%(year)d%(mon)02d' % {'year': nowdatetime.year, 'mon': nowdatetime.month,'stock': stock_no}
      stkm = memcache.get(memname)
      if stkm:
        csv_read = csv.reader(stkm)
        logging.info('#MemcacheGet: %s' % memname)
      else:
        cc = urllib2.urlopen(url)
        cc_read = cc.readlines()
        csv_read = csv.reader(cc_read)
        if expire != 'ALUP':
          memcache.add(memname, cc_read, expire)
        else:
          memcache.delete(memname)
        memcache.add('time%s' % memname, '%s %s' % (now, expire))
        logging.info('#MemcacheAdd: %s' % memname)
  
      return csv_read