Using urllib and BeautifulSoup to retrieve info from web with Python
from BeautifulSoup import BeautifulSoup
soup = BeautifulSoup(htmlSource)
No file writing needed: Just pass in the HTML string. You can also pass the object returned from urlopen
directly:
f = urllib.urlopen("http://SOMEWHERE")
soup = BeautifulSoup(f)