tasks = [
asyncio.create_task(
fetch(
url=odds + event + ":",
session=session,
semaphore=semaphore,
proxy=proxy,
)
)
for event, proxy in targets
]
for future in asyncio.as_completed(tasks):
response = await future
TOPICS = %w[
https://httpbin.org/ https://httpbin.org/
]
Async do |task|
TOPICS.each do |uri|
task.async do
puts HTTParty.get(uri).body
end
end
end