I am trying to teach myself asyncio so as an exercise I built a [web scraper](https://github.com/brucepucci/asyncio_scraper/blob/master/get_gids_async.py). The main working peice is the following recursive function...

```
async def get_gids(base_url='http://gd2.mlb.com/components/game/mlb/'):
    soup = await get_soup(base_url)

    for link in soup.find_all('a'):
        dest = link.get('href')

        fut = asyncio.Future()

        def set_result(out):
            try:
                fut.set_result(out.result())
            except:
                pass

        if dest.startswith('year_') and dest[YEAR] in VALID_YEARS:
            in_fut = asyncio.ensure_future(get_gids(base_url + dest))
            in_fut.add_done_callback(set_result)
        elif dest.startswith('month_') and dest[MONTH] in VALID_MONTHS:
            in_fut = asyncio.ensure_future(get_gids(base_url + dest))
            in_fut.add_done_callback(set_result)
        elif dest.startswith('day_'):
            in_fut = asyncio.ensure_future(get_gids(base_url + dest))
            in_fut.add_done_callback(set_result)
        elif dest.startswith('gid_'):
            if await is_regular_season(base_url + dest):
                print('gid: {}'.format(dest))
                gids.append(dest)
        else:
            pass

```

In a `run_forever` loop this works great. However, It is desired that it runs and finishes without me having to kill it, something like `run_unitl_complete(get_gids())` but this seems not to work as I only get the first page back. I tried this...

```
f = asyncio.wait(get_gids())  
loop.run_until_complete(f)  

```

Again with no success as a TypeError gets raised... `TypeError: expect a list of futures, not coroutine`

What can I do to run the loop until the original function call gets popped off the call stack?