MCPcopy Create free account
hub / github.com/BruceDevices/firmware / minify_html

Function minify_html

patch.py:112–118  ·  view source on GitHub ↗
(html)

Source from the content-addressed store, hash-verified

110
111
112def minify_html(html):
113 minify_req = requests.post(
114 'https://www.toptal.com/developers/html-minifier/api/raw',
115 {'input': html.read().decode('utf-8')},
116 timeout=10
117 )
118 return html if minify_req is False else minify_req.text.encode('utf-8')
119
120
121# gzip web files

Callers 1

prepare_www_filesFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected