You are here: Home Plone My Python Scripts Saves the html code of a page in a string
Search
Advanced Search…
E-Mail

Webmail: webmail.wyden.com

E-Mail Preferences: postfix.wyden.com/users

E-Mail Administration: postfix.wyden.com

Statistics
Total: 463
Total Pages: 284
Total Folders: 87
Total Files: 18
Total Links: 26
Last modification: 03.02.2012 16:00
 

Saves the html code of a page in a string

by Wyden Silvan last modified 26.11.2009 11:57

import urllib2

def getHTML(self):
  obj = urllib2.urlopen("http://myurl.com")
  code = obj.read()
  obj.close()
  return unicode(code, 'utf-8')