KekikStream 2.3.2__py3-none-any.whl → 2.3.4__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/Core/HTMLHelper.py +134 -0
- KekikStream/Core/Plugin/PluginBase.py +4 -1
- KekikStream/Core/__init__.py +2 -0
- KekikStream/Extractors/CloseLoad.py +12 -13
- KekikStream/Extractors/ContentX.py +12 -15
- KekikStream/Extractors/DonilasPlay.py +10 -10
- KekikStream/Extractors/DzenRu.py +3 -3
- KekikStream/Extractors/ExPlay.py +10 -10
- KekikStream/Extractors/Filemoon.py +11 -16
- KekikStream/Extractors/JetTv.py +4 -4
- KekikStream/Extractors/MixPlayHD.py +10 -11
- KekikStream/Extractors/MolyStream.py +5 -9
- KekikStream/Extractors/Odnoklassniki.py +4 -4
- KekikStream/Extractors/PeaceMakerst.py +3 -3
- KekikStream/Extractors/PixelDrain.py +6 -5
- KekikStream/Extractors/PlayerFilmIzle.py +6 -10
- KekikStream/Extractors/RapidVid.py +8 -7
- KekikStream/Extractors/SetPlay.py +10 -10
- KekikStream/Extractors/SetPrime.py +3 -6
- KekikStream/Extractors/SibNet.py +4 -5
- KekikStream/Extractors/Sobreatsesuyp.py +5 -5
- KekikStream/Extractors/TRsTX.py +5 -5
- KekikStream/Extractors/TurboImgz.py +3 -4
- KekikStream/Extractors/TurkeyPlayer.py +5 -5
- KekikStream/Extractors/VidHide.py +4 -7
- KekikStream/Extractors/VidMoly.py +24 -25
- KekikStream/Extractors/VidMoxy.py +8 -9
- KekikStream/Extractors/VidPapi.py +5 -7
- KekikStream/Extractors/VideoSeyred.py +3 -3
- KekikStream/Plugins/BelgeselX.py +40 -51
- KekikStream/Plugins/DiziBox.py +53 -81
- KekikStream/Plugins/DiziPal.py +41 -74
- KekikStream/Plugins/DiziYou.py +95 -88
- KekikStream/Plugins/Dizilla.py +51 -71
- KekikStream/Plugins/FilmBip.py +24 -49
- KekikStream/Plugins/FilmMakinesi.py +35 -52
- KekikStream/Plugins/FilmModu.py +27 -41
- KekikStream/Plugins/FullHDFilm.py +57 -62
- KekikStream/Plugins/FullHDFilmizlesene.py +35 -51
- KekikStream/Plugins/HDFilmCehennemi.py +48 -62
- KekikStream/Plugins/JetFilmizle.py +32 -50
- KekikStream/Plugins/KultFilmler.py +42 -67
- KekikStream/Plugins/RecTV.py +7 -4
- KekikStream/Plugins/RoketDizi.py +30 -50
- KekikStream/Plugins/SelcukFlix.py +15 -29
- KekikStream/Plugins/SetFilmIzle.py +41 -70
- KekikStream/Plugins/SezonlukDizi.py +47 -65
- KekikStream/Plugins/Sinefy.py +34 -50
- KekikStream/Plugins/SinemaCX.py +31 -55
- KekikStream/Plugins/Sinezy.py +27 -54
- KekikStream/Plugins/SuperFilmGeldi.py +25 -44
- KekikStream/Plugins/UgurFilm.py +23 -48
- {kekikstream-2.3.2.dist-info → kekikstream-2.3.4.dist-info}/METADATA +1 -1
- kekikstream-2.3.4.dist-info/RECORD +83 -0
- kekikstream-2.3.2.dist-info/RECORD +0 -82
- {kekikstream-2.3.2.dist-info → kekikstream-2.3.4.dist-info}/WHEEL +0 -0
- {kekikstream-2.3.2.dist-info → kekikstream-2.3.4.dist-info}/entry_points.txt +0 -0
- {kekikstream-2.3.2.dist-info → kekikstream-2.3.4.dist-info}/licenses/LICENSE +0 -0
- {kekikstream-2.3.2.dist-info → kekikstream-2.3.4.dist-info}/top_level.txt +0 -0
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
2
|
|
|
3
|
-
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, SeriesInfo, Episode, Subtitle, ExtractResult
|
|
4
|
-
from selectolax.parser import HTMLParser
|
|
3
|
+
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, SeriesInfo, Episode, Subtitle, ExtractResult, HTMLHelper
|
|
5
4
|
from Kekik.Sifreleme import Packer, StreamDecoder
|
|
6
|
-
import random, string
|
|
5
|
+
import random, string
|
|
7
6
|
|
|
8
7
|
class HDFilmCehennemi(PluginBase):
|
|
9
8
|
name = "HDFilmCehennemi"
|
|
10
9
|
language = "tr"
|
|
11
|
-
main_url = "https://www.hdfilmcehennemi.
|
|
10
|
+
main_url = "https://www.hdfilmcehennemi.nl"
|
|
12
11
|
favicon = f"https://www.google.com/s2/favicons?domain={main_url}&sz=64"
|
|
13
12
|
description = "Türkiye'nin en hızlı hd film izleme sitesi. Tek ve gerçek hdfilmcehennemi sitesi."
|
|
14
13
|
|
|
@@ -31,16 +30,13 @@ class HDFilmCehennemi(PluginBase):
|
|
|
31
30
|
|
|
32
31
|
async def get_main_page(self, page: int, url: str, category: str) -> list[MainPageResult]:
|
|
33
32
|
istek = await self.httpx.get(f"{url}", follow_redirects=True)
|
|
34
|
-
secici =
|
|
33
|
+
secici = HTMLHelper(istek.text)
|
|
35
34
|
|
|
36
35
|
results = []
|
|
37
|
-
for veri in secici.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
title = title_el.text(strip=True) if title_el else None
|
|
42
|
-
href = veri.attrs.get("href")
|
|
43
|
-
poster = img_el.attrs.get("data-src") if img_el else None
|
|
36
|
+
for veri in secici.select("div.section-content a.poster"):
|
|
37
|
+
title = secici.select_text("strong.poster-title", veri)
|
|
38
|
+
href = veri.attrs.get("href")
|
|
39
|
+
poster = secici.select_attr("img", "data-src", veri)
|
|
44
40
|
|
|
45
41
|
if title and href:
|
|
46
42
|
results.append(MainPageResult(
|
|
@@ -64,14 +60,10 @@ class HDFilmCehennemi(PluginBase):
|
|
|
64
60
|
|
|
65
61
|
results = []
|
|
66
62
|
for veri in istek.json().get("results", []):
|
|
67
|
-
secici =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
title = title_el.text(strip=True) if title_el else None
|
|
73
|
-
href = link_el.attrs.get("href") if link_el else None
|
|
74
|
-
poster = (img_el.attrs.get("data-src") or img_el.attrs.get("src")) if img_el else None
|
|
63
|
+
secici = HTMLHelper(veri)
|
|
64
|
+
title = secici.select_text("h4.title")
|
|
65
|
+
href = secici.select_attr("a", "href")
|
|
66
|
+
poster = secici.select_attr("img", "data-src") or secici.select_attr("img", "src")
|
|
75
67
|
|
|
76
68
|
if title and href:
|
|
77
69
|
results.append(SearchResult(
|
|
@@ -84,53 +76,47 @@ class HDFilmCehennemi(PluginBase):
|
|
|
84
76
|
|
|
85
77
|
async def load_item(self, url: str) -> MovieInfo | SeriesInfo:
|
|
86
78
|
istek = await self.httpx.get(url, headers = {"Referer": f"{self.main_url}/"})
|
|
87
|
-
secici =
|
|
79
|
+
secici = HTMLHelper(istek.text)
|
|
88
80
|
|
|
89
|
-
|
|
90
|
-
title = title_el.text(strip=True) if title_el else ""
|
|
81
|
+
title = secici.select_text("h1.section-title") or ""
|
|
91
82
|
|
|
92
|
-
|
|
93
|
-
poster
|
|
83
|
+
poster = secici.select_attr("aside.post-info-poster img.lazyload", "data-src") or ""
|
|
84
|
+
poster = poster.strip()
|
|
94
85
|
|
|
95
|
-
|
|
96
|
-
description = desc_el.text(strip=True) if desc_el else ""
|
|
86
|
+
description = secici.select_text("article.post-info-content > p") or ""
|
|
97
87
|
|
|
98
|
-
tags
|
|
88
|
+
tags = secici.select_all_text("div.post-info-genres a")
|
|
99
89
|
|
|
100
|
-
|
|
101
|
-
rating = rating_el.text(strip=True) if rating_el else ""
|
|
90
|
+
rating = secici.select_text("div.post-info-imdb-rating span") or ""
|
|
102
91
|
|
|
103
|
-
|
|
104
|
-
year = year_el.text(strip=True) if year_el else ""
|
|
92
|
+
year = secici.select_text("div.post-info-year-country a") or ""
|
|
105
93
|
|
|
106
|
-
actors =
|
|
94
|
+
actors = secici.select_all_text("div.post-info-cast a > strong")
|
|
107
95
|
|
|
108
|
-
|
|
109
|
-
duration_str = duration_el.text(strip=True) if duration_el else "0"
|
|
96
|
+
duration_str = secici.select_text("div.post-info-duration") or "0"
|
|
110
97
|
duration_str = duration_str.replace("dakika", "").strip()
|
|
111
98
|
|
|
112
99
|
try:
|
|
113
|
-
|
|
114
|
-
duration_minutes = int(
|
|
100
|
+
duration_val = HTMLHelper(duration_str).regex_first(r'\d+')
|
|
101
|
+
duration_minutes = int(duration_val) if duration_val else 0
|
|
115
102
|
except Exception:
|
|
116
103
|
duration_minutes = 0
|
|
117
104
|
|
|
118
105
|
# Dizi mi film mi kontrol et (Kotlin referansı: div.seasons kontrolü)
|
|
119
|
-
is_series = len(secici.
|
|
106
|
+
is_series = len(secici.select("div.seasons")) > 0
|
|
120
107
|
|
|
121
108
|
if is_series:
|
|
122
109
|
episodes = []
|
|
123
|
-
for ep in secici.
|
|
124
|
-
|
|
125
|
-
ep_name = ep_name_el.text(strip=True) if ep_name_el else None
|
|
110
|
+
for ep in secici.select("div.seasons-tab-content a"):
|
|
111
|
+
ep_name = secici.select_text("h4", ep)
|
|
126
112
|
ep_href = ep.attrs.get("href")
|
|
127
113
|
|
|
128
114
|
if ep_name and ep_href:
|
|
129
115
|
# Regex ile sezon ve bölüm numarası çıkar
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
ep_num = int(
|
|
133
|
-
sz_num = int(
|
|
116
|
+
ep_val = HTMLHelper(ep_name).regex_first(r'(\d+)\.\s*Bölüm')
|
|
117
|
+
sz_val = HTMLHelper(ep_name).regex_first(r'(\d+)\.\s*Sezon')
|
|
118
|
+
ep_num = int(ep_val) if ep_val and ep_val.isdigit() else 1
|
|
119
|
+
sz_num = int(sz_val) if sz_val and sz_val.isdigit() else 1
|
|
134
120
|
|
|
135
121
|
episodes.append(Episode(
|
|
136
122
|
season = sz_num,
|
|
@@ -208,19 +194,19 @@ class HDFilmCehennemi(PluginBase):
|
|
|
208
194
|
def _extract_from_json_ld(self, html: str) -> str | None:
|
|
209
195
|
"""JSON-LD script tag'inden contentUrl'i çıkar (Kotlin versiyonundaki gibi)"""
|
|
210
196
|
# Önce JSON-LD'den dene
|
|
211
|
-
|
|
212
|
-
if
|
|
197
|
+
json_ld = HTMLHelper(html).regex_first(r'(?s)<script[^>]+type=["\']application/ld\+json["\'][^>]*>(.*?)</script>')
|
|
198
|
+
if json_ld:
|
|
213
199
|
try:
|
|
214
200
|
import json
|
|
215
|
-
data = json.loads(
|
|
201
|
+
data = json.loads(json_ld.strip())
|
|
216
202
|
if content_url := data.get("contentUrl"):
|
|
217
203
|
if content_url.startswith("http"):
|
|
218
204
|
return content_url
|
|
219
205
|
except Exception:
|
|
220
206
|
# Regex ile contentUrl'i çıkarmayı dene
|
|
221
|
-
|
|
222
|
-
if
|
|
223
|
-
return
|
|
207
|
+
content_url = HTMLHelper(html).regex_first(r'"contentUrl"\s*:\s*"([^"]+)"')
|
|
208
|
+
if content_url and content_url.startswith("http"):
|
|
209
|
+
return content_url
|
|
224
210
|
return None
|
|
225
211
|
|
|
226
212
|
async def invoke_local_source(self, iframe: str, source: str, url: str):
|
|
@@ -239,12 +225,12 @@ class HDFilmCehennemi(PluginBase):
|
|
|
239
225
|
# Fallback: Packed JavaScript'ten çıkar
|
|
240
226
|
if not video_url:
|
|
241
227
|
# eval(function...) içeren packed script bul
|
|
242
|
-
|
|
243
|
-
if not
|
|
228
|
+
eval_script = HTMLHelper(istek.text).regex_first(r'(eval\(function[\s\S]+)')
|
|
229
|
+
if not eval_script:
|
|
244
230
|
return await self.cehennempass(iframe.split("/")[-1])
|
|
245
231
|
|
|
246
232
|
try:
|
|
247
|
-
unpacked = Packer.unpack(
|
|
233
|
+
unpacked = Packer.unpack(eval_script)
|
|
248
234
|
video_url = StreamDecoder.extract_stream_url(unpacked)
|
|
249
235
|
except Exception:
|
|
250
236
|
return await self.cehennempass(iframe.split("/")[-1])
|
|
@@ -255,10 +241,10 @@ class HDFilmCehennemi(PluginBase):
|
|
|
255
241
|
subtitles = []
|
|
256
242
|
try:
|
|
257
243
|
sub_data = istek.text.split("tracks: [")[1].split("]")[0]
|
|
258
|
-
for
|
|
244
|
+
for file_url, lang in HTMLHelper(sub_data).regex_all(r'(?s)file":"([^\\"]+)".*?"language":"([^\\"]+)"'):
|
|
259
245
|
subtitles.append(Subtitle(
|
|
260
|
-
name =
|
|
261
|
-
url = self.fix_url(
|
|
246
|
+
name = lang.upper(),
|
|
247
|
+
url = self.fix_url(file_url.replace("\\", "")),
|
|
262
248
|
))
|
|
263
249
|
except Exception:
|
|
264
250
|
pass
|
|
@@ -272,13 +258,13 @@ class HDFilmCehennemi(PluginBase):
|
|
|
272
258
|
|
|
273
259
|
async def load_links(self, url: str) -> list[ExtractResult]:
|
|
274
260
|
istek = await self.httpx.get(url)
|
|
275
|
-
secici =
|
|
261
|
+
secici = HTMLHelper(istek.text)
|
|
276
262
|
|
|
277
263
|
results = []
|
|
278
|
-
for alternatif in secici.
|
|
264
|
+
for alternatif in secici.select("div.alternative-links"):
|
|
279
265
|
lang_code = alternatif.attrs.get("data-lang", "").upper()
|
|
280
266
|
|
|
281
|
-
for link in
|
|
267
|
+
for link in secici.select("button.alternative-link", alternatif):
|
|
282
268
|
source_text = link.text(strip=True).replace('(HDrip Xbet)', '').strip()
|
|
283
269
|
source = f"{source_text} {lang_code}"
|
|
284
270
|
video_id = link.attrs.get("data-video")
|
|
@@ -295,8 +281,8 @@ class HDFilmCehennemi(PluginBase):
|
|
|
295
281
|
},
|
|
296
282
|
)
|
|
297
283
|
|
|
298
|
-
|
|
299
|
-
iframe =
|
|
284
|
+
iframe = HTMLHelper(api_get.text).regex_first(r'data-src=\\\"([^\"]+)')
|
|
285
|
+
iframe = iframe.replace("\\", "") if iframe else None
|
|
300
286
|
|
|
301
287
|
if not iframe:
|
|
302
288
|
continue
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
2
|
|
|
3
|
-
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, ExtractResult
|
|
4
|
-
from selectolax.parser import HTMLParser
|
|
5
|
-
import re
|
|
3
|
+
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, ExtractResult, HTMLHelper
|
|
6
4
|
|
|
7
5
|
class JetFilmizle(PluginBase):
|
|
8
6
|
name = "JetFilmizle"
|
|
@@ -40,23 +38,21 @@ class JetFilmizle(PluginBase):
|
|
|
40
38
|
|
|
41
39
|
async def get_main_page(self, page: int, url: str, category: str) -> list[MainPageResult]:
|
|
42
40
|
istek = await self.httpx.get(f"{url}{page}", follow_redirects=True)
|
|
43
|
-
secici =
|
|
41
|
+
secici = HTMLHelper(istek.text)
|
|
44
42
|
|
|
45
43
|
results = []
|
|
46
|
-
for veri in secici.
|
|
44
|
+
for veri in secici.select("article.movie"):
|
|
47
45
|
# h2-h6 içindeki a linki
|
|
48
|
-
|
|
46
|
+
title_text = None
|
|
49
47
|
for h_tag in ["h2", "h3", "h4", "h5", "h6"]:
|
|
50
|
-
|
|
51
|
-
if
|
|
48
|
+
title_text = secici.select_text(f"{h_tag} a", veri)
|
|
49
|
+
if title_text:
|
|
52
50
|
break
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
href = secici.select_attr("a", "href", veri)
|
|
53
|
+
poster = secici.select_poster("img", veri)
|
|
56
54
|
|
|
57
|
-
title = self.clean_title(
|
|
58
|
-
href = link_el.attrs.get("href") if link_el else None
|
|
59
|
-
poster = (img_el.attrs.get("data-src") or img_el.attrs.get("src")) if img_el else None
|
|
55
|
+
title = self.clean_title(title_text) if title_text else None
|
|
60
56
|
|
|
61
57
|
if title and href:
|
|
62
58
|
results.append(MainPageResult(
|
|
@@ -74,23 +70,21 @@ class JetFilmizle(PluginBase):
|
|
|
74
70
|
data = {"s": query},
|
|
75
71
|
headers = {"Referer": f"{self.main_url}/"}
|
|
76
72
|
)
|
|
77
|
-
secici =
|
|
73
|
+
secici = HTMLHelper(istek.text)
|
|
78
74
|
|
|
79
75
|
results = []
|
|
80
|
-
for article in secici.
|
|
76
|
+
for article in secici.select("article.movie"):
|
|
81
77
|
# h2-h6 içindeki a linki
|
|
82
|
-
|
|
78
|
+
title_text = None
|
|
83
79
|
for h_tag in ["h2", "h3", "h4", "h5", "h6"]:
|
|
84
|
-
|
|
85
|
-
if
|
|
80
|
+
title_text = secici.select_text(f"{h_tag} a", article)
|
|
81
|
+
if title_text:
|
|
86
82
|
break
|
|
87
83
|
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
href = secici.select_attr("a", "href", article)
|
|
85
|
+
poster = secici.select_poster("img", article)
|
|
90
86
|
|
|
91
|
-
title = self.clean_title(
|
|
92
|
-
href = link_el.attrs.get("href") if link_el else None
|
|
93
|
-
poster = (img_el.attrs.get("data-src") or img_el.attrs.get("src")) if img_el else None
|
|
87
|
+
title = self.clean_title(title_text) if title_text else None
|
|
94
88
|
|
|
95
89
|
if title and href:
|
|
96
90
|
results.append(SearchResult(
|
|
@@ -103,33 +97,22 @@ class JetFilmizle(PluginBase):
|
|
|
103
97
|
|
|
104
98
|
async def load_item(self, url: str) -> MovieInfo:
|
|
105
99
|
istek = await self.httpx.get(url)
|
|
106
|
-
secici =
|
|
107
|
-
html_text = istek.text
|
|
100
|
+
secici = HTMLHelper(istek.text)
|
|
108
101
|
|
|
109
|
-
|
|
110
|
-
title = self.clean_title(title_el.text(strip=True)) if title_el else None
|
|
102
|
+
title = self.clean_title(secici.select_text("div.movie-exp-title")) if secici.select_text("div.movie-exp-title") else None
|
|
111
103
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
poster = poster_raw.strip() if poster_raw else None
|
|
104
|
+
poster = secici.select_poster("section.movie-exp img")
|
|
105
|
+
poster = poster.strip() if poster else None
|
|
115
106
|
|
|
116
|
-
|
|
117
|
-
description = desc_el.text(strip=True) if desc_el else None
|
|
107
|
+
description = secici.select_text("section.movie-exp p.aciklama")
|
|
118
108
|
|
|
119
|
-
tags =
|
|
109
|
+
tags = secici.select_all_text("section.movie-exp div.catss a")
|
|
120
110
|
|
|
121
|
-
|
|
122
|
-
rating = rating_el.text(strip=True) if rating_el else None
|
|
111
|
+
rating = secici.select_text("section.movie-exp div.imdb_puan span")
|
|
123
112
|
|
|
124
|
-
|
|
125
|
-
year = None
|
|
126
|
-
yap_match = re.search(r'<div class="yap"[^>]*>([^<]*(?:Vizyon|Yapım)[^<]*)</div>', html_text, re.IGNORECASE)
|
|
127
|
-
if yap_match:
|
|
128
|
-
year_match = re.search(r'(\d{4})', yap_match.group(1))
|
|
129
|
-
if year_match:
|
|
130
|
-
year = year_match.group(1)
|
|
113
|
+
year = secici.extract_year("div.yap")
|
|
131
114
|
|
|
132
|
-
actors =
|
|
115
|
+
actors = secici.select_all_text("div[itemprop='actor'] a span")
|
|
133
116
|
|
|
134
117
|
return MovieInfo(
|
|
135
118
|
url = url,
|
|
@@ -144,12 +127,12 @@ class JetFilmizle(PluginBase):
|
|
|
144
127
|
|
|
145
128
|
async def load_links(self, url: str) -> list[ExtractResult]:
|
|
146
129
|
istek = await self.httpx.get(url)
|
|
147
|
-
secici =
|
|
130
|
+
secici = HTMLHelper(istek.text)
|
|
148
131
|
|
|
149
132
|
results = []
|
|
150
133
|
|
|
151
134
|
# 1) Ana iframe'leri kontrol et
|
|
152
|
-
for iframe in secici.
|
|
135
|
+
for iframe in secici.select("iframe"):
|
|
153
136
|
src = (iframe.attrs.get("src") or
|
|
154
137
|
iframe.attrs.get("data-src") or
|
|
155
138
|
iframe.attrs.get("data-lazy-src"))
|
|
@@ -162,9 +145,8 @@ class JetFilmizle(PluginBase):
|
|
|
162
145
|
|
|
163
146
|
# 2) Sayfa numaralarından linkleri topla (Fragman hariç)
|
|
164
147
|
page_links = []
|
|
165
|
-
for link in secici.
|
|
166
|
-
|
|
167
|
-
isim = span_el.text(strip=True) if span_el else ""
|
|
148
|
+
for link in secici.select("a.post-page-numbers"):
|
|
149
|
+
isim = secici.select_text("span", link) or ""
|
|
168
150
|
if isim != "Fragman":
|
|
169
151
|
href = link.attrs.get("href")
|
|
170
152
|
if href:
|
|
@@ -174,9 +156,9 @@ class JetFilmizle(PluginBase):
|
|
|
174
156
|
for page_url, isim in page_links:
|
|
175
157
|
try:
|
|
176
158
|
page_resp = await self.httpx.get(page_url)
|
|
177
|
-
page_sel =
|
|
159
|
+
page_sel = HTMLHelper(page_resp.text)
|
|
178
160
|
|
|
179
|
-
for iframe in page_sel.
|
|
161
|
+
for iframe in page_sel.select("div#movie iframe"):
|
|
180
162
|
src = (iframe.attrs.get("src") or
|
|
181
163
|
iframe.attrs.get("data-src") or
|
|
182
164
|
iframe.attrs.get("data-lazy-src"))
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
2
|
|
|
3
|
-
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, SeriesInfo, Episode, ExtractResult, Subtitle
|
|
4
|
-
|
|
5
|
-
import re, base64
|
|
3
|
+
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, SeriesInfo, Episode, ExtractResult, Subtitle, HTMLHelper
|
|
4
|
+
import base64
|
|
6
5
|
|
|
7
6
|
class KultFilmler(PluginBase):
|
|
8
7
|
name = "KultFilmler"
|
|
@@ -38,16 +37,13 @@ class KultFilmler(PluginBase):
|
|
|
38
37
|
|
|
39
38
|
async def get_main_page(self, page: int, url: str, category: str) -> list[MainPageResult]:
|
|
40
39
|
istek = await self.httpx.get(url)
|
|
41
|
-
secici =
|
|
40
|
+
secici = HTMLHelper(istek.text)
|
|
42
41
|
|
|
43
42
|
results = []
|
|
44
|
-
for veri in secici.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
title = img_el.attrs.get("alt") if img_el else None
|
|
49
|
-
href = link_el.attrs.get("href") if link_el else None
|
|
50
|
-
poster = img_el.attrs.get("src") if img_el else None
|
|
43
|
+
for veri in secici.select("div.col-md-12 div.movie-box"):
|
|
44
|
+
title = secici.select_attr("div.img img", "alt", veri)
|
|
45
|
+
href = secici.select_attr("a", "href", veri)
|
|
46
|
+
poster = secici.select_attr("div.img img", "src", veri)
|
|
51
47
|
|
|
52
48
|
if title and href:
|
|
53
49
|
results.append(MainPageResult(
|
|
@@ -61,16 +57,13 @@ class KultFilmler(PluginBase):
|
|
|
61
57
|
|
|
62
58
|
async def search(self, query: str) -> list[SearchResult]:
|
|
63
59
|
istek = await self.httpx.get(f"{self.main_url}?s={query}")
|
|
64
|
-
secici =
|
|
60
|
+
secici = HTMLHelper(istek.text)
|
|
65
61
|
|
|
66
62
|
results = []
|
|
67
|
-
for veri in secici.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
title = img_el.attrs.get("alt") if img_el else None
|
|
72
|
-
href = link_el.attrs.get("href") if link_el else None
|
|
73
|
-
poster = img_el.attrs.get("src") if img_el else None
|
|
63
|
+
for veri in secici.select("div.movie-box"):
|
|
64
|
+
title = secici.select_attr("div.img img", "alt", veri)
|
|
65
|
+
href = secici.select_attr("a", "href", veri)
|
|
66
|
+
poster = secici.select_attr("div.img img", "src", veri)
|
|
74
67
|
|
|
75
68
|
if title and href:
|
|
76
69
|
results.append(SearchResult(
|
|
@@ -83,58 +76,43 @@ class KultFilmler(PluginBase):
|
|
|
83
76
|
|
|
84
77
|
async def load_item(self, url: str) -> MovieInfo | SeriesInfo:
|
|
85
78
|
istek = await self.httpx.get(url)
|
|
86
|
-
secici =
|
|
87
|
-
|
|
88
|
-
film_img = secici.css_first("div.film-bilgileri img")
|
|
89
|
-
og_title = secici.css_first("[property='og:title']")
|
|
90
|
-
og_image = secici.css_first("[property='og:image']")
|
|
79
|
+
secici = HTMLHelper(istek.text)
|
|
91
80
|
|
|
92
|
-
title =
|
|
93
|
-
poster = self.fix_url(
|
|
81
|
+
title = secici.select_attr("div.film-bilgileri img", "alt") or secici.select_attr("[property='og:title']", "content")
|
|
82
|
+
poster = self.fix_url(secici.select_attr("[property='og:image']", "content")) if secici.select_attr("[property='og:image']", "content") else None
|
|
94
83
|
|
|
95
|
-
|
|
96
|
-
description = desc_el.text(strip=True) if desc_el else None
|
|
84
|
+
description = secici.select_text("div.description")
|
|
97
85
|
|
|
98
|
-
tags = [a.text(strip=True) for a in secici.
|
|
86
|
+
tags = [a.text(strip=True) for a in secici.select("ul.post-categories a") if a.text(strip=True)]
|
|
99
87
|
|
|
100
88
|
# HTML analizine göre güncellenen alanlar
|
|
101
|
-
|
|
102
|
-
year = year_el.text(strip=True) if year_el else None
|
|
89
|
+
year = secici.select_text("li.release span a")
|
|
103
90
|
|
|
104
|
-
|
|
105
|
-
duration = None
|
|
106
|
-
if time_el:
|
|
107
|
-
time_text = time_el.text(strip=True)
|
|
108
|
-
dur_match = re.search(r"(\d+)", time_text)
|
|
109
|
-
duration = dur_match.group(1) if dur_match else None
|
|
91
|
+
time_text = secici.select_text("li.time span")
|
|
92
|
+
duration = secici.regex_first(r"(\d+)", time_text) if time_text else None
|
|
110
93
|
|
|
111
|
-
|
|
112
|
-
rating = rating_el.text(strip=True) if rating_el else None
|
|
94
|
+
rating = secici.select_text("div.imdb-count")
|
|
113
95
|
|
|
114
|
-
actors = [a.text(strip=True) for a in secici.
|
|
96
|
+
actors = [a.text(strip=True) for a in secici.select("div.actors a") if a.text(strip=True)]
|
|
115
97
|
|
|
116
98
|
# Dizi mi kontrol et
|
|
117
99
|
if "/dizi/" in url:
|
|
118
100
|
episodes = []
|
|
119
|
-
for bolum in secici.
|
|
120
|
-
|
|
121
|
-
ep_href = name_link.attrs.get("href") if name_link else None
|
|
101
|
+
for bolum in secici.select("div.episode-box"):
|
|
102
|
+
ep_href = secici.select_attr("div.name a", "href", bolum)
|
|
122
103
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
ep_b_el = bolum.css_first("span.episodetitle b")
|
|
127
|
-
ep_detail = ep_b_el.text(strip=True) if ep_b_el else ""
|
|
104
|
+
ssn_detail = secici.select_text("span.episodetitle", bolum) or ""
|
|
105
|
+
ep_detail = secici.select_text("span.episodetitle b", bolum) or ""
|
|
128
106
|
|
|
129
107
|
ep_name = f"{ssn_detail} - {ep_detail}"
|
|
130
108
|
|
|
131
109
|
if ep_href:
|
|
132
|
-
ep_season =
|
|
133
|
-
ep_episode =
|
|
110
|
+
ep_season = secici.regex_first(r"(\d+)\.", ssn_detail)
|
|
111
|
+
ep_episode = secici.regex_first(r"(\d+)\.", ep_detail)
|
|
134
112
|
|
|
135
113
|
episodes.append(Episode(
|
|
136
|
-
season = int(ep_season
|
|
137
|
-
episode = int(ep_episode
|
|
114
|
+
season = int(ep_season) if ep_season else 1,
|
|
115
|
+
episode = int(ep_episode) if ep_episode else 1,
|
|
138
116
|
title = ep_name.strip(" -"),
|
|
139
117
|
url = self.fix_url(ep_href),
|
|
140
118
|
))
|
|
@@ -165,12 +143,10 @@ class KultFilmler(PluginBase):
|
|
|
165
143
|
|
|
166
144
|
def _get_iframe(self, source_code: str) -> str:
|
|
167
145
|
"""Base64 kodlu iframe'i çözümle"""
|
|
168
|
-
|
|
169
|
-
if not
|
|
146
|
+
atob = HTMLHelper(source_code).regex_first(r"PHA\+[0-9a-zA-Z+/=]*")
|
|
147
|
+
if not atob:
|
|
170
148
|
return ""
|
|
171
149
|
|
|
172
|
-
atob = atob_match.group()
|
|
173
|
-
|
|
174
150
|
# Padding düzelt
|
|
175
151
|
padding = 4 - len(atob) % 4
|
|
176
152
|
if padding < 4:
|
|
@@ -178,20 +154,19 @@ class KultFilmler(PluginBase):
|
|
|
178
154
|
|
|
179
155
|
try:
|
|
180
156
|
decoded = base64.b64decode(atob).decode("utf-8")
|
|
181
|
-
secici =
|
|
182
|
-
|
|
183
|
-
return self.fix_url(
|
|
157
|
+
secici = HTMLHelper(decoded)
|
|
158
|
+
iframe_src = secici.select_attr("iframe", "src")
|
|
159
|
+
return self.fix_url(iframe_src) if iframe_src else ""
|
|
184
160
|
except Exception:
|
|
185
161
|
return ""
|
|
186
162
|
|
|
187
163
|
def _extract_subtitle_url(self, source_code: str) -> str | None:
|
|
188
164
|
"""Altyazı URL'sini çıkar"""
|
|
189
|
-
|
|
190
|
-
return match[1] if match else None
|
|
165
|
+
return HTMLHelper(source_code).regex_first(r"(https?://[^\s\"]+\.srt)")
|
|
191
166
|
|
|
192
167
|
async def load_links(self, url: str) -> list[ExtractResult]:
|
|
193
168
|
istek = await self.httpx.get(url)
|
|
194
|
-
secici =
|
|
169
|
+
secici = HTMLHelper(istek.text)
|
|
195
170
|
|
|
196
171
|
iframes = set()
|
|
197
172
|
|
|
@@ -201,9 +176,9 @@ class KultFilmler(PluginBase):
|
|
|
201
176
|
iframes.add(main_frame)
|
|
202
177
|
|
|
203
178
|
# Alternatif player'lar
|
|
204
|
-
for player in secici.
|
|
205
|
-
|
|
206
|
-
alt_iframe = self.fix_url(
|
|
179
|
+
for player in secici.select("div.container#player"):
|
|
180
|
+
iframe_src = secici.select_attr("iframe", "src", player)
|
|
181
|
+
alt_iframe = self.fix_url(iframe_src) if iframe_src else None
|
|
207
182
|
if alt_iframe:
|
|
208
183
|
alt_istek = await self.httpx.get(alt_iframe)
|
|
209
184
|
alt_frame = self._get_iframe(alt_istek.text)
|
|
@@ -222,12 +197,12 @@ class KultFilmler(PluginBase):
|
|
|
222
197
|
"Sec-Fetch-Dest" : "iframe"
|
|
223
198
|
}
|
|
224
199
|
iframe_istek = await self.httpx.get(iframe, headers=headers)
|
|
225
|
-
m3u_match =
|
|
200
|
+
m3u_match = HTMLHelper(iframe_istek.text).regex_first(r'file:"([^"]+)"')
|
|
226
201
|
|
|
227
202
|
if m3u_match:
|
|
228
203
|
results.append(ExtractResult(
|
|
229
204
|
name = "VidMoly",
|
|
230
|
-
url = m3u_match
|
|
205
|
+
url = m3u_match,
|
|
231
206
|
referer = self.main_url,
|
|
232
207
|
subtitles = []
|
|
233
208
|
))
|
KekikStream/Plugins/RecTV.py
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
2
|
|
|
3
|
-
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, Episode, SeriesInfo, ExtractResult
|
|
3
|
+
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, Episode, SeriesInfo, ExtractResult, HTMLHelper
|
|
4
4
|
from json import dumps, loads
|
|
5
|
-
import re
|
|
6
5
|
|
|
7
6
|
class RecTV(PluginBase):
|
|
8
7
|
name = "RecTV"
|
|
@@ -84,9 +83,13 @@ class RecTV(PluginBase):
|
|
|
84
83
|
"is_episode" : True
|
|
85
84
|
}
|
|
86
85
|
|
|
86
|
+
# Extract season/episode numbers using helper
|
|
87
|
+
s1, _ = HTMLHelper.extract_season_episode(season.get("title") or "")
|
|
88
|
+
_, e2 = HTMLHelper.extract_season_episode(episode.get("title") or "")
|
|
89
|
+
|
|
87
90
|
ep_model = Episode(
|
|
88
|
-
season =
|
|
89
|
-
episode =
|
|
91
|
+
season = s1 or 1,
|
|
92
|
+
episode = e2 or 1,
|
|
90
93
|
title = episode.get("title"),
|
|
91
94
|
url = dumps(ep_data),
|
|
92
95
|
)
|