Skip to content

Commit 440b342

Browse files
committed
fix: deps
1 parent 26ce624 commit 440b342

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

twscrape/queue_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import json
33
import os
44
from typing import Any
5+
from urllib.parse import urlparse
56

67
import httpx
78
from httpx import AsyncClient, Response
8-
from urllib3.util import parse_url
99

1010
from .accounts_pool import Account, AccountsPool
1111
from .logger import logger
@@ -55,8 +55,7 @@ async def aclose(self):
5555
async def req(self, method: str, url: str, params: ReqParams = None) -> Response:
5656
# if code 404 on first try then generate new x-client-transaction-id and retry once
5757
# https://github.com/vladkens/twscrape/issues/248
58-
59-
path = parse_url(url).path or "/"
58+
path = urlparse(url).path or "/"
6059

6160
gen = await XClIdGenStore.get(self.acc.username)
6261
hdr = {"x-client-transaction-id": gen.calc(method, path)}

0 commit comments

Comments
 (0)