Skip to content

Commit ac39bc7

Browse files
UltimaHoarderUltimaHoarder
authored andcommitted
refactor: Reorder import statements and remove unnecessary isinstance checks in OnlyFansWebSocket
1 parent d87610a commit ac39bc7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • ultima_scraper_api/apis/onlyfans/classes/websocket

ultima_scraper_api/apis/onlyfans/classes/websocket/websocket.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
import websockets
1111

12-
from ultima_scraper_api.apis.onlyfans.urls import APIRoutes
1312
from ultima_scraper_api.apis.onlyfans.classes.extras import AuthDetails
13+
from ultima_scraper_api.apis.onlyfans.urls import APIRoutes
1414
from ultima_scraper_api.managers.websocket_manager.protocol import WebSocketProtocol
1515

1616
if TYPE_CHECKING:
@@ -103,7 +103,6 @@ async def connect(self) -> None:
103103

104104
logger.debug("OnlyFans WebSocket connected")
105105

106-
# Send initial connect frame with auth token if available
107106
assert isinstance(self.auth, OnlyFansAuthModel)
108107
token = self.auth.user.ws_auth_token
109108
if token:
@@ -224,7 +223,6 @@ async def _refresh_ws_credentials(self) -> None:
224223
new_token = json_resp.get("wsAuthToken")
225224
new_url = json_resp.get("wsUrl")
226225
assert isinstance(self.auth, OnlyFansAuthModel)
227-
228226
if new_token and new_token != self.auth.user.ws_auth_token:
229227
self.auth.user.ws_auth_token = new_token
230228
logger.info("Refreshed OnlyFans WS auth token")

0 commit comments

Comments
 (0)