fix: Async runner for main module
This commit is contained in:
1 parent
1a820b7dd1
commit
affec0c1bd
1 file changed
+5
-3
@@ -1,11 +1,13 @@
|
|||||||
from .crawler import CovidCrawler
|
from .crawler import CovidCrawler
|
||||||
|
|
||||||
|
|
||||||
def main():
|
async def main():
|
||||||
crawler = CovidCrawler()
|
crawler = CovidCrawler()
|
||||||
result = crawler.crawl()
|
result = await crawler.crawl()
|
||||||
print(result)
|
print(result)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
import asyncio
|
||||||
|
|
||||||
|
asyncio.run(main())
|
||||||
Reference in new issue
Block a user