Skip to content

Instantly share code, notes, and snippets.

@dw

dw/script.py

Created Feb 13, 2018
Embed
What would you like to do?
import mitogen
import requests
def get_url(url):
return requests.get(url).text
@mitogen.main()
def main(router):
host = router.ssh(hostname='k3')
print host.call(get_url, 'https://www.google.com/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment