KekikStream 2.2.7__py3-none-any.whl → 2.2.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- KekikStream/Extractors/CloseLoad.py +41 -4
- KekikStream/Plugins/HDFilmCehennemi.py +31 -35
- {kekikstream-2.2.7.dist-info → kekikstream-2.2.8.dist-info}/METADATA +1 -1
- {kekikstream-2.2.7.dist-info → kekikstream-2.2.8.dist-info}/RECORD +8 -8
- {kekikstream-2.2.7.dist-info → kekikstream-2.2.8.dist-info}/WHEEL +0 -0
- {kekikstream-2.2.7.dist-info → kekikstream-2.2.8.dist-info}/entry_points.txt +0 -0
- {kekikstream-2.2.7.dist-info → kekikstream-2.2.8.dist-info}/licenses/LICENSE +0 -0
- {kekikstream-2.2.7.dist-info → kekikstream-2.2.8.dist-info}/top_level.txt +0 -0
|
@@ -3,22 +3,59 @@
|
|
|
3
3
|
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle
|
|
4
4
|
from Kekik.Sifreleme import Packer, StreamDecoder
|
|
5
5
|
from selectolax.parser import HTMLParser
|
|
6
|
-
import re
|
|
6
|
+
import re, json
|
|
7
7
|
|
|
8
8
|
class CloseLoadExtractor(ExtractorBase):
|
|
9
9
|
name = "CloseLoad"
|
|
10
10
|
main_url = "https://closeload.filmmakinesi.to"
|
|
11
11
|
|
|
12
|
+
def _extract_from_json_ld(self, html: str) -> str | None:
|
|
13
|
+
"""JSON-LD script tag'inden contentUrl'i çıkar (Kotlin versiyonundaki gibi)"""
|
|
14
|
+
secici = HTMLParser(html)
|
|
15
|
+
for script in secici.css("script[type='application/ld+json']"):
|
|
16
|
+
try:
|
|
17
|
+
data = json.loads(script.text(strip=True))
|
|
18
|
+
if content_url := data.get("contentUrl"):
|
|
19
|
+
if content_url.startswith("http"):
|
|
20
|
+
return content_url
|
|
21
|
+
except (json.JSONDecodeError, TypeError):
|
|
22
|
+
# Regex ile contentUrl'i çıkarmayı dene
|
|
23
|
+
match = re.search(r'"contentUrl"\s*:\s*"([^"]+)"', script.text())
|
|
24
|
+
if match and match.group(1).startswith("http"):
|
|
25
|
+
return match.group(1)
|
|
26
|
+
return None
|
|
27
|
+
|
|
28
|
+
def _extract_from_packed(self, html: str) -> str | None:
|
|
29
|
+
"""Packed JavaScript'ten video URL'sini çıkar (fallback)"""
|
|
30
|
+
try:
|
|
31
|
+
eval_func = re.compile(r'\s*(eval\(function[\s\S].*)').findall(html)
|
|
32
|
+
if eval_func:
|
|
33
|
+
return StreamDecoder.extract_stream_url(Packer.unpack(eval_func[0]))
|
|
34
|
+
except Exception:
|
|
35
|
+
pass
|
|
36
|
+
return None
|
|
37
|
+
|
|
12
38
|
async def extract(self, url, referer=None) -> ExtractResult:
|
|
13
39
|
if referer:
|
|
14
40
|
self.httpx.headers.update({"Referer": referer})
|
|
41
|
+
|
|
42
|
+
self.httpx.headers.update({
|
|
43
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 Edg/140.0.0.0",
|
|
44
|
+
"Origin": self.main_url
|
|
45
|
+
})
|
|
15
46
|
|
|
16
47
|
istek = await self.httpx.get(url)
|
|
17
48
|
istek.raise_for_status()
|
|
18
49
|
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
50
|
+
# Önce JSON-LD'den dene (daha güvenilir - Kotlin versiyonu gibi)
|
|
51
|
+
m3u_link = self._extract_from_json_ld(istek.text)
|
|
52
|
+
|
|
53
|
+
# Fallback: Packed JavaScript'ten çıkar
|
|
54
|
+
if not m3u_link:
|
|
55
|
+
m3u_link = self._extract_from_packed(istek.text)
|
|
56
|
+
|
|
57
|
+
if not m3u_link:
|
|
58
|
+
raise Exception("Video URL bulunamadı (ne JSON-LD ne de packed script'ten)")
|
|
22
59
|
|
|
23
60
|
# Subtitle'ları parse et (Kotlin referansı: track elementleri)
|
|
24
61
|
subtitles = []
|
|
@@ -205,30 +205,23 @@ class HDFilmCehennemi(PluginBase):
|
|
|
205
205
|
|
|
206
206
|
return results
|
|
207
207
|
|
|
208
|
-
def
|
|
209
|
-
"""
|
|
210
|
-
#
|
|
211
|
-
|
|
212
|
-
if
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
# 3) Array içindeki string parçalarını topla
|
|
226
|
-
parts = re.findall(r'["\']([^"\']+)["\']', array_body)
|
|
227
|
-
if not parts:
|
|
228
|
-
return ""
|
|
229
|
-
|
|
230
|
-
# 4) Özel decoder ile çöz
|
|
231
|
-
return StreamDecoder.extract_stream_url(unpacked)
|
|
208
|
+
def _extract_from_json_ld(self, html: str) -> str | None:
|
|
209
|
+
"""JSON-LD script tag'inden contentUrl'i çıkar (Kotlin versiyonundaki gibi)"""
|
|
210
|
+
# Önce JSON-LD'den dene
|
|
211
|
+
json_ld_match = re.search(r'<script[^>]+type=["\']application/ld\+json["\'][^>]*>(.*?)</script>', html, re.DOTALL)
|
|
212
|
+
if json_ld_match:
|
|
213
|
+
try:
|
|
214
|
+
import json
|
|
215
|
+
data = json.loads(json_ld_match.group(1).strip())
|
|
216
|
+
if content_url := data.get("contentUrl"):
|
|
217
|
+
if content_url.startswith("http"):
|
|
218
|
+
return content_url
|
|
219
|
+
except Exception:
|
|
220
|
+
# Regex ile contentUrl'i çıkarmayı dene
|
|
221
|
+
match = re.search(r'"contentUrl"\s*:\s*"([^"]+)"', html)
|
|
222
|
+
if match and match.group(1).startswith("http"):
|
|
223
|
+
return match.group(1)
|
|
224
|
+
return None
|
|
232
225
|
|
|
233
226
|
async def invoke_local_source(self, iframe: str, source: str, url: str):
|
|
234
227
|
self.httpx.headers.update({
|
|
@@ -240,18 +233,21 @@ class HDFilmCehennemi(PluginBase):
|
|
|
240
233
|
if not istek.text:
|
|
241
234
|
return await self.cehennempass(iframe.split("/")[-1])
|
|
242
235
|
|
|
243
|
-
#
|
|
244
|
-
|
|
245
|
-
if not eval_match:
|
|
246
|
-
return await self.cehennempass(iframe.split("/")[-1])
|
|
236
|
+
# Önce JSON-LD'den dene (Kotlin versiyonu gibi - daha güvenilir)
|
|
237
|
+
video_url = self._extract_from_json_ld(istek.text)
|
|
247
238
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
239
|
+
# Fallback: Packed JavaScript'ten çıkar
|
|
240
|
+
if not video_url:
|
|
241
|
+
# eval(function...) içeren packed script bul
|
|
242
|
+
eval_match = re.search(r'(eval\(function[\s\S]+)', istek.text)
|
|
243
|
+
if not eval_match:
|
|
244
|
+
return await self.cehennempass(iframe.split("/")[-1])
|
|
245
|
+
|
|
246
|
+
try:
|
|
247
|
+
unpacked = Packer.unpack(eval_match.group(1))
|
|
248
|
+
video_url = StreamDecoder.extract_stream_url(unpacked)
|
|
249
|
+
except Exception:
|
|
250
|
+
return await self.cehennempass(iframe.split("/")[-1])
|
|
255
251
|
|
|
256
252
|
if not video_url:
|
|
257
253
|
return await self.cehennempass(iframe.split("/")[-1])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: KekikStream
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.8
|
|
4
4
|
Summary: 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ı
|
|
5
5
|
Home-page: https://github.com/keyiflerolsun/KekikStream
|
|
6
6
|
Author: keyiflerolsun
|
|
@@ -16,7 +16,7 @@ KekikStream/Core/Plugin/PluginLoader.py,sha256=GcDqN1u3nJeoGKH_oDFHCpwteJlLCxHNb
|
|
|
16
16
|
KekikStream/Core/Plugin/PluginManager.py,sha256=CZVg1eegi8vfMfccx0DRV0Box8kXz-aoULTQLgbPbvM,893
|
|
17
17
|
KekikStream/Core/Plugin/PluginModels.py,sha256=Yvx-6Fkn8QCIcuqAkFbCP5EJcq3XBkK_P8S0tRNhS6E,2476
|
|
18
18
|
KekikStream/Core/UI/UIManager.py,sha256=T4V_kdTTWa-UDamgLSKa__dWJuzcvRK9NuwBlzU9Bzc,1693
|
|
19
|
-
KekikStream/Extractors/CloseLoad.py,sha256=
|
|
19
|
+
KekikStream/Extractors/CloseLoad.py,sha256=xlNcUnPfCJJAu1O-YxzjbbA-i14KZ7DADAfTK1biF-s,3197
|
|
20
20
|
KekikStream/Extractors/ContentX.py,sha256=x0j67e1OAw4L1m7ejUTyiIxqr1EhvpjaA_0U-s4IQ-I,3617
|
|
21
21
|
KekikStream/Extractors/DonilasPlay.py,sha256=Lr60pEht96SMlXICYWo9J5dOwV4ty8fetBCCqJ3ARUY,3221
|
|
22
22
|
KekikStream/Extractors/DzenRu.py,sha256=X0Rhm1-W4YjQwVrJs8YFqVcCxMaZi8rsKiLhK_ZsYlU,1185
|
|
@@ -60,7 +60,7 @@ KekikStream/Plugins/FilmMakinesi.py,sha256=jdQ1Ger72Wf402h-RpOx1TmvCWD0_gDSafKkA
|
|
|
60
60
|
KekikStream/Plugins/FilmModu.py,sha256=ZUrBAq1mK2na8YuZEmev64tGhLrql-n-KK1wYDLICn0,7730
|
|
61
61
|
KekikStream/Plugins/FullHDFilm.py,sha256=B8ckb2TftuzfAgxNBs_rkIuAHc9YNVqjG_H9Y3QqGQM,10822
|
|
62
62
|
KekikStream/Plugins/FullHDFilmizlesene.py,sha256=Y6wzW4JnALT91FR_RAmbi1KhM6m7NYlCBh8UGXkKeSs,7900
|
|
63
|
-
KekikStream/Plugins/HDFilmCehennemi.py,sha256=
|
|
63
|
+
KekikStream/Plugins/HDFilmCehennemi.py,sha256=Snwdnt1AhmKN535J4G8US8DeJVNpXZtxxW7hUo7Szp0,13867
|
|
64
64
|
KekikStream/Plugins/JetFilmizle.py,sha256=zqSk1NbOsClViJfETX64jiqREaEDfRskQseIBOzwl-c,8860
|
|
65
65
|
KekikStream/Plugins/KultFilmler.py,sha256=eUWXuo3I_qg3Z8k9uM-Xyy4DLfK1jKeFR2I284MjNks,10240
|
|
66
66
|
KekikStream/Plugins/RecTV.py,sha256=Nj4AdeetPMzvZ-VKUdUGhBC1SiFSBRYRebODgE2UeI8,7228
|
|
@@ -74,9 +74,9 @@ KekikStream/Plugins/SinemaCX.py,sha256=6mYz7Yqja_weEfCiLrzMhji1eiSKaYHj0vX4aomDW
|
|
|
74
74
|
KekikStream/Plugins/Sinezy.py,sha256=zBpxUpIIfdnZdolPdkxLMkTsWeGUMW1lht3dNwp_AYU,6756
|
|
75
75
|
KekikStream/Plugins/SuperFilmGeldi.py,sha256=zrTMpAP4NTxhQ4lgprBPXkihE7oQu2jNY7IFA7NWWYA,7144
|
|
76
76
|
KekikStream/Plugins/UgurFilm.py,sha256=S4Zrml9I3W3iW_2feLJWSkvsVZHpQQQlXRJk4E8li-c,5999
|
|
77
|
-
kekikstream-2.2.
|
|
78
|
-
kekikstream-2.2.
|
|
79
|
-
kekikstream-2.2.
|
|
80
|
-
kekikstream-2.2.
|
|
81
|
-
kekikstream-2.2.
|
|
82
|
-
kekikstream-2.2.
|
|
77
|
+
kekikstream-2.2.8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
78
|
+
kekikstream-2.2.8.dist-info/METADATA,sha256=MjxtPrvZeBBjFYTnTuvHKaILY-HSjENche8fOtE_BOE,10761
|
|
79
|
+
kekikstream-2.2.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
80
|
+
kekikstream-2.2.8.dist-info/entry_points.txt,sha256=dFwdiTx8djyehI0Gsz-rZwjAfZzUzoBSrmzRu9ubjJc,50
|
|
81
|
+
kekikstream-2.2.8.dist-info/top_level.txt,sha256=DNmGJDXl27Drdfobrak8KYLmocW_uznVYFJOzcjUgmY,12
|
|
82
|
+
kekikstream-2.2.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|