Skip to content

Instantly share code, notes, and snippets.

@pfcbenjamin
Created January 2, 2015 01:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfcbenjamin/a3c355f6857a00f5b685 to your computer and use it in GitHub Desktop.
Save pfcbenjamin/a3c355f6857a00f5b685 to your computer and use it in GitHub Desktop.
download-page.py
import urllib, webbrowser, clipboard, editor, os.path
url = clipboard.get()
page = urllib.urlopen(url)
content = page.read()
# Code below ripped from Ole Zorn's New from Gist script
from urlparse import urlparse
filename = os.path.split(urlparse(url).path)[1]
editor.make_new_file(filename, content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment