Skip to content

Commit

Permalink
Fixing not enough values to unpack
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixitov committed May 9, 2023
1 parent 4f0d78a commit 2c805ea
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 0 deletions.
Binary file not shown.
Binary file added src/joiner/__pycache__/joiner.cpython-310.pyc
Binary file not shown.
Binary file added src/joiner/__pycache__/scraper.cpython-310.pyc
Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions src/joiner/websocket_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import websockets
import json
import re
import asyncio

class WbScraper():
def __init__(self):
Expand All @@ -15,9 +16,19 @@ async def scrape(self, auth_token, case_filter_list):
auth_message = f"40/case-battle,{json.dumps(auth_payload)}"
await websocket.send(auth_message)

async def keep_alive():
while True:
await asyncio.sleep(25)
await websocket.send("3")

asyncio.ensure_future(keep_alive())

while True:
message = await websocket.recv()

if "," not in message:
continue

message_type, message_data = message.split(",", maxsplit=1)
if message_type == "42/case-battle":
if '"public",true,' in message_data and ',null]],[],' in message_data:
Expand Down
Binary file added src/utils/__pycache__/cf_bypass.cpython-310.pyc
Binary file not shown.
Binary file added src/utils/__pycache__/color.cpython-310.pyc
Binary file not shown.
Binary file added src/utils/__pycache__/utils.cpython-310.pyc
Binary file not shown.

0 comments on commit 2c805ea

Please sign in to comment.