Also save sent data

This commit is contained in:
TheTechRobo 2022-04-03 14:17:04 -04:00
parent de7c6beb2e
commit 9c3078ce08
1 changed files with 6 additions and 3 deletions

View File

@ -50,9 +50,12 @@ class PlaceScraper:
await self.add_to_db(self.db, self.wstable, {"data": a, "type": "newToken"})
self.token = a[i + 26 : i + 57] # thanks JAA for stopping me from using my .split() fuckery
async def _start_connection(self, ws):
await ws.send(raw_data.connection_init % self.token)
await ws.send(raw_data.id1)
await ws.send(raw_data.id2)
send1 = raw_data.connection_init % self.token
send2 = raw_data.id1
send3 = raw_data.id2
for send in send1, send2, send3:
await ws.send(send)
await self.add_to_db(self.db, "sent_ws", {"sent": send, "time": time.time()})
async def run_forever(self):
global STOP, STOPPED
connector = aiohttp.TCPConnector(limit=25)