MCPcopy
hub / github.com/liuwons/wxBot / search_content

Method search_content

wxbot.py:526–535  ·  view source on GitHub ↗
(key, content, fmat='attr')

Source from the content-addressed store, hash-verified

524
525 @staticmethod
526 def search_content(key, content, fmat='attr'):
527 if fmat == 'attr':
528 pm = re.search(key + '\s?=\s?"([^"<]+)"', content)
529 if pm:
530 return pm.group(1)
531 elif fmat == 'xml':
532 pm = re.search('<{0}>([^<]+)</{0}>'.format(key), content)
533 if pm:
534 return pm.group(1)
535 return 'unknown'
536
537 def run(self):
538 self.get_uuid()

Callers 1

extract_msg_contentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected