MCPcopy Create free account
hub / github.com/SpaceZephyr/myskill / get_markdown

Method get_markdown

web-scraper/scripts/fetch_url.py:145–152  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

143 self.result.append(text + ' ')
144
145 def get_markdown(self) -> str:
146 text = ''.join(self.result)
147 # Clean up excessive whitespace
148 text = re.sub(r'\n{3,}', '\n\n', text)
149 text = re.sub(r' +', ' ', text)
150 text = re.sub(r'\n +', '\n', text)
151 text = re.sub(r'\[\s*\]', '', text) # Remove empty links
152 return text.strip()
153
154
155def fetch_with_requests(url: str, timeout: int = 30) -> str:

Callers 1

fetch_urlFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected