Open
Description
Long story short
Redirect not been followed. I always get a 302
back.
Expected behaviour
Get a 200
back with text filled.
Steps to reproduce
import aiohttp
import asyncio
async def fetch(session, url):
async with session.get(url, allow_redirects=True) as response:
return await response.text(), response.status
async def fetch_all(session, urls, loop):
results = await asyncio.gather(
*[fetch(session, url) for url in urls],
)
for ret in results:
print("status: %s len: %s" % (ret[1], len(ret[0])))
return results
if __name__ == '__main__':
loop = asyncio.get_event_loop()
urls = ['https://www.gulp.de/gulp2/projekte/suche?scope=projects&query=python']
with aiohttp.ClientSession(loop=loop) as session:
loop.run_until_complete(fetch_all(session, urls, loop))