def _defaultFetcher(url):
 try:
  r = urlfetch.fetch(url, method=urlfetch.GET)
 except urlfetch.Error as e:
  log.warn((u'Error opening url=%r: %s' % (url, e)), error=IOError)
 else:
  if (r.status_code == 200):
   mimetype = 'application/octet-stream'
   try:
    (mimetype, params) = cgi.parse_header(r.headers['content-type'])
    encoding = params['charset']
   except KeyError:
    encoding = None
   if (mimetype != u'text/css'):
    log.error((u'Expected "text/css" mime type for url %r but found: %r' % (url, mimetype)), error=ValueError)
   return (encoding, r.content)
  else:
   log.warn((u'Error opening url=%r: HTTP status %s' % (url, r.status_code)), error=IOError)

def _defaultFetcher ( url ) : try : r = urlfetch . fetch ( url , method = urlfetch . GET ) except urlfetch . Error as e : log . warn ( ( u'Error opening url=%r: %s' % ( url , e ) ) , error = IOError ) else : if ( r . status_code == 200 ) : mimetype = 'application/octet-stream' try : ( mimetype , params ) = cgi . parse_header ( r . headers [ 'content-type' ] ) encoding = params [ 'charset' ] except KeyError : encoding = None if ( mimetype != u'text/css' ) : log . error ( ( u'Expected "text/css" mime type for url %r but found: %r' % ( url , mimetype ) ) , error = ValueError ) return ( encoding , r . content ) else : log . warn ( ( u'Error opening url=%r: HTTP status %s' % ( url , r . status_code ) ) , error = IOError )
uses googleappengine fetch response content the body content of the response .