예제 #1
0
  def pull_golfshot_data(self, golfer_data):
    """Read golfer data from Golfshot."""
    for golfer in golfer_data:
      output.header('Getting round data for %s' % golfer)
      self.golf_shot_reader = HtmlListReader(
          '%s%s/rounds' % (BASE_URL, golfer_data[golfer]))
      round_info = {}
      for page in self.golf_shot_reader.pages:
        data = HtmlListReader(
            '%s%s/rounds?page=%s' % (BASE_URL, golfer_data[golfer], page))

        round_info = self.write_to_db(golfer, data.round_data)