Skip to content

Instantly share code, notes, and snippets.

@acrymble
Created July 5, 2011 19:49
Show Gist options
  • Save acrymble/1065730 to your computer and use it in GitHub Desktop.
Save acrymble/1065730 to your computer and use it in GitHub Desktop.
Python Webpage to Text
# Given a URL, return string of lowercase text from page.
def webPageToText(url):
import urllib2
response = urllib2.urlopen(url)
html = response.read()
text = stripTags(html).lower()
return text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment