def _GetWeb(self):
    bucket_url, bucket_metadata = self.GetSingleBucketUrlFromArg(
        self.args[0], bucket_fields=['website'])

    if bucket_url.scheme == 's3':
      sys.stdout.write(self.gsutil_api.XmlPassThroughGetWebsite(
          bucket_url, provider=bucket_url.scheme))
    else:
      if bucket_metadata.website and (bucket_metadata.website.mainPageSuffix or
                                      bucket_metadata.website.notFoundPage):
        sys.stdout.write(str(encoding.MessageToJson(
            bucket_metadata.website)) + '\n')
      else:
        sys.stdout.write('%s has no website configuration.\n' % bucket_url)

    return 0
Gets website configuration for a bucket.
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/commands/web.py/WebCommand._GetWeb