import eventlet
eventlet.monkey_patch()
import requests
urls = ['http://solutions.fas.gov.ru/search.json?action=index&'
'controller=documents&page=%s' % page for page in range(1, 29044)]
def fetch(url):
return requests.get(url)
pool = eventlet.GreenPool()
for response in pool.imap(fetch, urls):
# Клади ответ в ES
print('gotcha')