MCPcopy
hub / github.com/yhangf/PythonCrawler / async_get_all_shares

Method async_get_all_shares

spiderFile/get_top_sec_com.py:50–60  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48 return [*sec_com, market_value.groups()[0]]
49
50 async def async_get_all_shares(self):
51 tasks = []
52 for sec_com in self.useful_sec_com_list:
53 url = self.shares_api + sec_com[0]
54 tasks.append(
55 asyncio.create_task(
56 self.async_get_shares_details(sec_com, url)
57 )
58 )
59 done, pendding = await asyncio.wait(tasks)
60 return [share.result() for share in done if share.result()]
61
62 def get_shares_details(self):
63 all_shares = []

Callers 1

yield_pictureMethod · 0.95

Calls 1

Tested by

no test coverage detected