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

Method async_get_shares_details

spiderFile/get_top_sec_com.py:42–48  ·  view source on GitHub ↗
(self, sec_com, url)

Source from the content-addressed store, hash-verified

40 return useful_sec_com_list
41
42 async def async_get_shares_details(self, sec_com, url):
43 async with aiohttp.ClientSession() as session:
44 async with session.get(url, headers=self.headers) as response:
45 html = await response.text()
46 market_value = re.search("<td>总市值:<span>(.*?)亿</span>", html)
47 if market_value:
48 return [*sec_com, market_value.groups()[0]]
49
50 async def async_get_all_shares(self):
51 tasks = []

Callers 1

async_get_all_sharesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected