Skip to content

Instantly share code, notes, and snippets.

@paultopia
Last active December 29, 2015 17:39
Show Gist options
  • Save paultopia/1103beb1980851a57977 to your computer and use it in GitHub Desktop.
Save paultopia/1103beb1980851a57977 to your computer and use it in GitHub Desktop.
scrapewrap.py
import sys
import spideyscrape
import console
import os
args = sys.argv[1:] # see if the user gave us a command line argument
start = args[0] if args else raw_input('URL to crawl: ')
html = spideyscrape.scrape(start)
filename = spideyscrape.savePage(html)
console.open_in(filename)
os.remove(filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment