I have written a simple scraping program using asyncio. Here are my code snippets:
loop = asyncio.get_event_loop()
task = loop.create_task(conSpi.parse(arguments.url))
value = loop.run_until_complete(asyncio.wait([task]))
loop.close()
I want to print the result being returned in value
. Rather than printing the variable's value, it prints something like this:
{<Task finished coro=<ConcurrentSpider.parse() done,
defined at /home/afraz/PycharmProjects/the-lab/concurrentspider.py:28> result=3>}
How can I get the result only and not get rest printed?