MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / get_content_html

Method get_content_html

apps/common/utils/fork.py:106–115  ·  view source on GitHub ↗
(self, bf: BeautifulSoup)

Source from the content-addressed store, hash-verified

104 return result
105
106 def get_content_html(self, bf: BeautifulSoup):
107 if self.selector_list is None or len(self.selector_list) == 0:
108 return str(bf)
109 params = reduce(lambda x, y: {**x, **y},
110 [{'class_': selector.replace('.', '')} if selector.startswith('.') else
111 {'id': selector.replace("#", "")} if selector.startswith("#") else {'name': selector} for
112 selector in
113 self.selector_list], {})
114 f = bf.find_all(**params)
115 return "\n".join([str(row) for row in f])
116
117 @staticmethod
118 def reset_url(tag, field, base_fork_url):

Callers 1

forkMethod · 0.95

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected