-
-
Save zoghal/ced47502fed1dc7d0397 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ghost import Ghost | |
from sys import argv | |
def main(): | |
url = argv[1] | |
path = argv[2] | |
screenshot(url,path) | |
def screenshot(url,path): | |
ghost = Ghost() | |
ghost.open(url) | |
ghost.capture_to(path, region=None, selector=None, format=None) | |
#ghost.show() | |
ghost.exit() | |
#return True | |
if __name__ == "__main__": | |
if len(argv) == 3: | |
main() | |
else: | |
print(argv) | |
print("not enough/to many args") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment