Skip to content

Instantly share code, notes, and snippets.

@zoghal
Forked from ereli/gist:5cc39cff8bbb19b16997
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoghal/65a62033de593b98e774 to your computer and use it in GitHub Desktop.
Save zoghal/65a62033de593b98e774 to your computer and use it in GitHub Desktop.
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