check it
This commit is contained in:
parent
4fa66ada1a
commit
2d0da3df18
|
@ -191,11 +191,11 @@ echo "<meta http-equiv=\"refresh\" content=\"0; url='${UMAPGEN}'\" />" > ~/.zen/
|
|||
echo "<meta http-equiv=\"refresh\" content=\"0; url='${USATGEN}'\" />" > ~/.zen/tmp/${MOATS}/Usat.html
|
||||
|
||||
## COPY MAP IMAGE
|
||||
#~ python ${MY_PATH}/../page_screenshot.py "${myIPFS}${UMAPGEN}" /tmp/Umap.jpg 900 900
|
||||
#~ python ${MY_PATH}/../tools/page_screenshot.py "${myIPFS}${UMAPGEN}" /tmp/Umap.jpg 900 900
|
||||
# chromium --headless --disable-gpu --screenshot=/tmp/Umap.png --window-size=1200x1200 "${myIPFS}${UMAPGEN}"
|
||||
|
||||
## COPY SAT IMAGE
|
||||
#~ python ${MY_PATH}/../page_screenshot.py "${myIPFS}${USATGEN}" /tmp/Usat.jpg 900 900
|
||||
#~ python ${MY_PATH}/../tools/page_screenshot.py "${myIPFS}${USATGEN}" /tmp/Usat.jpg 900 900
|
||||
# chromium --headless --disable-gpu --screenshot=/tmp/Usat.png --window-size=1200x1200 "${myIPFS}${USATGEN}"
|
||||
|
||||
## CREATE HTML for LAST of U Keys
|
||||
|
|
|
@ -15,7 +15,7 @@ async def take_screenshot(url, output_file, width, height):
|
|||
finally:
|
||||
await browser.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main():
|
||||
if len(sys.argv) != 5:
|
||||
print("Usage: python page_screenshot.py <URL> <output_file> <width> <height>")
|
||||
sys.exit(1)
|
||||
|
@ -25,4 +25,10 @@ if __name__ == "__main__":
|
|||
width = int(sys.argv[3])
|
||||
height = int(sys.argv[4])
|
||||
|
||||
asyncio.get_event_loop().run_until_complete(take_screenshot(url, output_file, width, height))
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
loop.run_until_complete(take_screenshot(url, output_file, width, height))
|
||||
loop.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue