MCPcopy Create free account
hub / github.com/aitjcize/cppman / _extract_name

Method _extract_name

cppman/main.py:311–317  ·  view source on GitHub ↗

Extract man page name from web page.

(self, data)

Source from the content-addressed store, hash-verified

309 return results
310
311 def _extract_name(self, data):
312 """Extract man page name from web page."""
313 name = re.search('<[hH]1[^>]*>(.+?)</[hH]1>', data, re.DOTALL).group(1)
314 name = re.sub(r'<([^>]+)>', r'', name)
315 name = re.sub(r'&gt;', r'>', name)
316 name = re.sub(r'&lt;', r'<', name)
317 return html.unescape(name)
318
319 def _parse_expression(self, expr):
320 """

Callers 1

process_documentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected