示例#1
0
文件: main.py 项目: fapatipat/TheQube
 def process_update(self, update, *args, **kwargs):
  update = self.find_new_data (update)
  update.reverse()
  for i in update:
   if 'text' in i:
    i['text'] = html_filter.StripChars(i['text'])
   if 'retweeted_status' in i and 'text' in i['retweeted_status']:
    i['retweeted_status']['text'] = html_filter.StripChars(i['retweeted_status']['text'])
   if 'quoted_status' in i and 'text' in i['quoted_status']:
    i['quoted_status']['text'] = html_filter.StripChars(i['quoted_status']['text'])
  return update
示例#2
0
文件: main.py 项目: fapatipat/TheQube
 def process_source(self, field):
  source = field
  if source is None:
   source = 'DM'
  source = html_filter.StripChars(source)
  if source.startswith("<a href"):
   source = source[:-4]
   source = source.split("\">")[1]
  return source