Add SteamBot
This commit is contained in:
@@ -2,7 +2,6 @@ __all__ = ['SteamBot']
|
|||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import base64
|
import base64
|
||||||
import itertools
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
@@ -44,8 +43,9 @@ class SteamBot(MultiBot, ABC):
|
|||||||
app_ids: Iterable[str],
|
app_ids: Iterable[str],
|
||||||
session: aiohttp.ClientSession
|
session: aiohttp.ClientSession
|
||||||
) -> None:
|
) -> None:
|
||||||
for ids_batch_batch in itertools.batched(
|
for ids_batch_batch in flanautils.chunks(
|
||||||
itertools.batched(app_ids, constants.STEAM_IDS_BATCH), constants.STEAM_MAX_CONCURRENT_REQUESTS
|
flanautils.chunks(list(app_ids), constants.STEAM_IDS_BATCH),
|
||||||
|
constants.STEAM_MAX_CONCURRENT_REQUESTS
|
||||||
):
|
):
|
||||||
gather_results = await asyncio.gather(
|
gather_results = await asyncio.gather(
|
||||||
*(self._get_app_data(session, ids_batch, steam_region.code) for ids_batch in ids_batch_batch)
|
*(self._get_app_data(session, ids_batch, steam_region.code) for ids_batch in ids_batch_batch)
|
||||||
|
|||||||
Reference in New Issue
Block a user