def getProfile(self, name):
    def getProfileInternal(name, url):
      page = self._fetchPage(url)
      for profile in page.select('td.profile'):
        span = profile.find('span')
        if not span or name != span.text:
          continue
        links = profile.parent.select('td.action a[href*="/download.action"]')
        if not links:
          continue
        link = '%s%s' % (self._baseUrl(url), links[0]['href'])
        return ProvisioningProfile(self._fetchUrl(link)[1])
      return None

    profile = getProfileInternal(name, _DISTRIBUTION_PROFILES_URL)
    if not profile:
      profile = getProfileInternal(name, _DEVELOPMENT_PROFILES_URL)
    if profile:
      print profile.data
dataset/ETHPy150Open viewfinderco/viewfinder/clients/ios/scripts/app-tool.py/DevCenterClient.getProfile/original