mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-01 04:32:09 +01:00
need to cache resolved peers in the future ([420 FLOOD_WAIT_X] - A wait of 29091 seconds is required )
This commit is contained in:
parent
df8c3e8421
commit
91119d0762
1 changed files with 2 additions and 0 deletions
|
@ -464,6 +464,7 @@ async def _fetch_and_track_mtproto(app, output_dir):
|
|||
else:
|
||||
bots_usernames_to_track.add('PremiumBot')
|
||||
|
||||
bots_usernames_to_track.clear()
|
||||
for bot_username in bots_usernames_to_track:
|
||||
bot_peer = await app.resolve_peer(bot_username)
|
||||
bot_full = (await app.invoke(functions.users.GetFullUser(id=bot_peer)))
|
||||
|
@ -474,6 +475,7 @@ async def _fetch_and_track_mtproto(app, output_dir):
|
|||
peers_to_track.add('invoice')
|
||||
peers_to_track.add('premium')
|
||||
|
||||
peers_to_track.clear()
|
||||
for peer_id in peers_to_track:
|
||||
peer = await app.resolve_peer(peer_id)
|
||||
configs[f'peer/{peer_id}'] = peer
|
||||
|
|
Loading…
Reference in a new issue