Web page rendering utility based on Google's Puppeteer
10K+
Like https://github.com/ukwa/webrender-phantomjs but backed by Google Puppeteer.
Note that npm can be used to control versioning in package.json and tagging. e.g. npm version major for a major version bump. Instead of major this can be minor or patch, i.e. SemVer.
Then a `git push origin master --follow-tags`` should build a suitably tagged release.
def build_imagemap(page_jpeg, page):
html = "%s [Static version of %s]\n\n<body style="margin: 0;">\n" % (page['title'], page['url'])
html = html + '\n' %( base64.b64encode(page_jpeg).decode('utf-8'), page['title'])
html = html + '\n'
for box in page['map']:
if 'href' in box:
x1 = box['location']['left']
y1 = box['location']['top']
x2 = x1 + box['location']['width']
y2 = y1 + box['location']['height']
html = html + '\n' % (x1,y1,x2,y2,box['href'])
else:
logger.debug("Skipping box with no 'href': %s" % box)
html = html + '\n'
html = html + "\n\n"
return html
Content type
Image
Digest
Size
437.4 MB
Last updated
about 4 years ago
docker pull ukwa/webrender-puppeteer