We could return a single results dictionary that indicates whether to page
again.

On Jun 29, 2013, at 1:37 PM, Eugene Fang <notifications@github.com> wrote:

In datafeeds/datafeed_usfirst.py:

> @@ -146,8 +110,18 @@ def getEventTeams(self, year, first_eid):
>          Returns a list of team_numbers attending a particular Event
>          """
>          if type(year) is not int: raise TypeError("year must be an integer")
> -        url = self.EVENT_TEAMS_URL_PATTERN % (first_eid, self.getSessionKey(year))
> -        teams = self.parse(url, UsfirstEventTeamsParser)
> +
> +        teams = []
> +        page = 0
> +        while True:
> +          url = self.EVENT_TEAMS_URL_PATTERN % (first_eid)
> +          if page != 0:
> +            url += '&page=%s' % page
> +          partial_teams, last_page = self.parse(url, UsfirstEventTeamsParser)

Unfortunately, yes. Any suggestions on how else to handle it?

—
Reply to this email directly or view it on
GitHub<https://github.com/gregmarra/the-blue-alliance/pull/658/files#r4952870>
.