Skip to content

Commit 1c18060

Browse files
committed
fix: Convert dictionary proxies to string for httpx client and update package version to 2.3.7.
1 parent e9c98f0 commit 1c18060

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

KekikStream/Core/Plugin/PluginBase.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,16 @@ def __init__(self, proxy: str | dict | None = None):
3131
if proxy:
3232
self.cloudscraper.proxies = proxy if isinstance(proxy, dict) else {"http": proxy, "https": proxy}
3333

34+
# Convert dict proxy to string for httpx if necessary
35+
httpx_proxy = proxy
36+
if isinstance(proxy, dict):
37+
httpx_proxy = proxy.get("https") or proxy.get("http")
38+
3439
# httpx - lightweight and safe for most HTTP requests
3540
self.httpx = AsyncClient(
3641
timeout = 3,
3742
follow_redirects = True,
38-
proxy = proxy
43+
proxy = httpx_proxy
3944
)
4045
self.httpx.headers.update(self.cloudscraper.headers)
4146
self.httpx.cookies.update(self.cloudscraper.cookies)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
setup(
77
# ? Genel Bilgiler
88
name = "KekikStream",
9-
version = "2.3.6",
9+
version = "2.3.7",
1010
url = "https://github.com/keyiflerolsun/KekikStream",
1111
description = "terminal üzerinden medya içeriği aramanızı ve VLC/MPV gibi popüler medya oynatıcılar aracılığıyla doğrudan izlemenizi sağlayan modüler ve genişletilebilir bir bıdı bıdı",
1212
keywords = ["KekikStream", "KekikAkademi", "keyiflerolsun"],

0 commit comments

Comments
 (0)