KekikStream 2.3.8__py3-none-any.whl → 2.4.0__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 +2 -2
- KekikStream/Core/Plugin/PluginModels.py +0 -3
- KekikStream/Extractors/HDMomPlayer.py +62 -0
- KekikStream/Extractors/MolyStream.py +8 -49
- KekikStream/Extractors/Videostr.py +115 -0
- KekikStream/Plugins/DiziBox.py +15 -25
- KekikStream/Plugins/DiziMom.py +248 -0
- KekikStream/Plugins/FilmEkseni.py +140 -0
- KekikStream/Plugins/Filmatek.py +188 -0
- KekikStream/Plugins/Full4kizle.py +190 -0
- KekikStream/Plugins/RecTV.py +32 -19
- KekikStream/Plugins/Watch32.py +185 -0
- {kekikstream-2.3.8.dist-info → kekikstream-2.4.0.dist-info}/METADATA +3 -3
- {kekikstream-2.3.8.dist-info → kekikstream-2.4.0.dist-info}/RECORD +18 -12
- {kekikstream-2.3.8.dist-info → kekikstream-2.4.0.dist-info}/WHEEL +1 -1
- KekikStream/Plugins/DiziWatch.py +0 -212
- {kekikstream-2.3.8.dist-info → kekikstream-2.4.0.dist-info}/entry_points.txt +0 -0
- {kekikstream-2.3.8.dist-info → kekikstream-2.4.0.dist-info}/licenses/LICENSE +0 -0
- {kekikstream-2.3.8.dist-info → kekikstream-2.4.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, SeriesInfo, ExtractResult, HTMLHelper
|
|
4
|
+
from json import dumps, loads
|
|
5
|
+
import re
|
|
6
|
+
|
|
7
|
+
class FilmEkseni(PluginBase):
|
|
8
|
+
name = "FilmEkseni"
|
|
9
|
+
language = "tr"
|
|
10
|
+
main_url = "https://filmekseni.cc"
|
|
11
|
+
favicon = f"https://www.google.com/s2/favicons?domain={main_url}&sz=64"
|
|
12
|
+
description = "Film Ekseni ⚡️ Vizyonda ki, en güncel ve en yeni filmleri full hd kalitesinde türkçe dublaj ve altyazı seçenekleriyle 1080p olarak izleyebileceğiniz adresiniz."
|
|
13
|
+
|
|
14
|
+
main_page = {
|
|
15
|
+
f"{main_url}/tur/aile-filmleri/page" : "Aile Filmleri",
|
|
16
|
+
f"{main_url}/tur/aksiyon-filmleri/page" : "Aksiyon Filmleri",
|
|
17
|
+
f"{main_url}/tur/animasyon-film-izle/page" : "Animasyon Filmleri",
|
|
18
|
+
f"{main_url}/tur/bilim-kurgu-filmleri/page" : "Bilim Kurgu Filmleri",
|
|
19
|
+
f"{main_url}/tur/biyografi-filmleri/page" : "Biyografi Filmleri",
|
|
20
|
+
f"{main_url}/tur/dram-filmleri-izle/page" : "Dram Filmleri",
|
|
21
|
+
f"{main_url}/tur/fantastik-filmler/page" : "Fantastik Filmleri",
|
|
22
|
+
f"{main_url}/tur/gerilim-filmleri/page" : "Gerilim Filmleri",
|
|
23
|
+
f"{main_url}/tur/gizem-filmleri/page" : "Gizem Filmleri",
|
|
24
|
+
f"{main_url}/tur/komedi-filmleri/page" : "Komedi Filmleri",
|
|
25
|
+
f"{main_url}/tur/korku-filmleri/page" : "Korku Filmleri",
|
|
26
|
+
f"{main_url}/tur/macera-filmleri/page" : "Macera Filmleri",
|
|
27
|
+
f"{main_url}/tur/romantik-filmler/page" : "Romantik Filmleri",
|
|
28
|
+
f"{main_url}/tur/savas-filmleri/page" : "Savaş Filmleri",
|
|
29
|
+
f"{main_url}/tur/suc-filmleri/page" : "Suç Filmleri",
|
|
30
|
+
f"{main_url}/tur/tarih-filmleri/page" : "Tarih Filmleri",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async def get_main_page(self, page: int, url: str, category: str) -> list[MainPageResult]:
|
|
34
|
+
istek = await self.httpx.get(f"{url}/{page}/")
|
|
35
|
+
helper = HTMLHelper(istek.text)
|
|
36
|
+
posters = helper.select("div.poster")
|
|
37
|
+
|
|
38
|
+
return [
|
|
39
|
+
MainPageResult(
|
|
40
|
+
category = category,
|
|
41
|
+
title = self.clean_title(helper.select_text("h2", veri)),
|
|
42
|
+
url = helper.select_attr("a", "href", veri),
|
|
43
|
+
poster = helper.select_attr("img", "data-src", veri)
|
|
44
|
+
)
|
|
45
|
+
for veri in posters
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
async def search(self, query: str) -> list[SearchResult]:
|
|
49
|
+
url = f"{self.main_url}/search/"
|
|
50
|
+
headers = {
|
|
51
|
+
"X-Requested-With" : "XMLHttpRequest",
|
|
52
|
+
"Content-Type" : "application/x-www-form-urlencoded; charset=UTF-8",
|
|
53
|
+
"Referer" : self.main_url,
|
|
54
|
+
}
|
|
55
|
+
data = {"query": query}
|
|
56
|
+
|
|
57
|
+
istek = await self.httpx.post(url, headers=headers, data=data)
|
|
58
|
+
veriler = istek.json().get("result", [])
|
|
59
|
+
|
|
60
|
+
return [
|
|
61
|
+
SearchResult(
|
|
62
|
+
title = veri.get("title"),
|
|
63
|
+
url = f"{self.main_url}/{veri.get('slug')}",
|
|
64
|
+
poster = f"{self.main_url}/uploads/poster/{veri.get('cover')}" if veri.get('cover') else None,
|
|
65
|
+
)
|
|
66
|
+
for veri in veriler
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
async def load_item(self, url: str) -> MovieInfo:
|
|
70
|
+
istek = await self.httpx.get(url)
|
|
71
|
+
helper = HTMLHelper(istek.text)
|
|
72
|
+
|
|
73
|
+
raw_title = helper.select_text("div.page-title h1")
|
|
74
|
+
title = raw_title.replace(" izle", "").strip() if raw_title else "Bilinmiyor"
|
|
75
|
+
|
|
76
|
+
poster = helper.select_attr("picture.poster-auto > source:nth-child(2)", "data-srcset")
|
|
77
|
+
description = helper.select_text("article.text-white")
|
|
78
|
+
year = helper.select_text("strong a")
|
|
79
|
+
|
|
80
|
+
tags_raw = helper.select_all_text("div.pb-2")
|
|
81
|
+
tags = []
|
|
82
|
+
for tag_str in tags_raw:
|
|
83
|
+
if tag_str.startswith("Tür:"):
|
|
84
|
+
tags.extend([t.strip() for t in tag_str.replace("Tür:", "").split(",")])
|
|
85
|
+
|
|
86
|
+
rating = helper.select_text("div.rate")
|
|
87
|
+
|
|
88
|
+
duration = None
|
|
89
|
+
duration_text = helper.select_text("div.d-flex.flex-column.text-nowrap")
|
|
90
|
+
if duration_text:
|
|
91
|
+
m = re.search(r"(\d+)", duration_text)
|
|
92
|
+
if m:
|
|
93
|
+
duration = int(m.group(1))
|
|
94
|
+
|
|
95
|
+
actors_raw = helper.select("div.card-body.p-0.pt-2 .story-item")
|
|
96
|
+
actors = []
|
|
97
|
+
for actor in actors_raw:
|
|
98
|
+
name = helper.select_text(".story-item-title", actor)
|
|
99
|
+
if name:
|
|
100
|
+
actors.append(name)
|
|
101
|
+
|
|
102
|
+
return MovieInfo(
|
|
103
|
+
url = url,
|
|
104
|
+
poster = self.fix_url(poster),
|
|
105
|
+
title = title,
|
|
106
|
+
description = description,
|
|
107
|
+
tags = tags,
|
|
108
|
+
rating = rating,
|
|
109
|
+
year = year,
|
|
110
|
+
actors = actors if actors else None,
|
|
111
|
+
duration = duration
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
async def load_links(self, url: str) -> list[ExtractResult]:
|
|
115
|
+
istek = await self.httpx.get(url)
|
|
116
|
+
helper = HTMLHelper(istek.text)
|
|
117
|
+
|
|
118
|
+
iframe = helper.select_first("div.card-video iframe")
|
|
119
|
+
if not iframe:
|
|
120
|
+
return []
|
|
121
|
+
|
|
122
|
+
iframe_url = iframe.attrs.get("data-src") or iframe.attrs.get("src")
|
|
123
|
+
if not iframe_url:
|
|
124
|
+
return []
|
|
125
|
+
|
|
126
|
+
if iframe_url.startswith("//"):
|
|
127
|
+
iframe_url = f"https:{iframe_url}"
|
|
128
|
+
|
|
129
|
+
video_id = iframe_url.split("/")[-1]
|
|
130
|
+
master_url = f"https://eksenload.site/uploads/encode/{video_id}/master.m3u8"
|
|
131
|
+
|
|
132
|
+
results = [
|
|
133
|
+
ExtractResult(
|
|
134
|
+
url = master_url,
|
|
135
|
+
name = f"{self.name} | 1080p",
|
|
136
|
+
referer = self.main_url
|
|
137
|
+
)
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
return results
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, SeriesInfo, Episode, ExtractResult, HTMLHelper
|
|
4
|
+
import re
|
|
5
|
+
from json import loads
|
|
6
|
+
|
|
7
|
+
class Filmatek(PluginBase):
|
|
8
|
+
name = "Filmatek"
|
|
9
|
+
language = "tr"
|
|
10
|
+
main_url = "https://filmatek.net"
|
|
11
|
+
favicon = f"https://www.google.com/s2/favicons?domain={main_url}&sz=64"
|
|
12
|
+
description = "Sosyalizmin Sineması Veritabanı"
|
|
13
|
+
|
|
14
|
+
# Main page categories
|
|
15
|
+
main_page = {
|
|
16
|
+
f"{main_url}/tur/aile/page" : "Aile",
|
|
17
|
+
f"{main_url}/tur/aksiyon/page" : "Aksiyon",
|
|
18
|
+
f"{main_url}/tur/animasyon/page" : "Animasyon",
|
|
19
|
+
f"{main_url}/tur/bilim-kurgu/page" : "Bilim Kurgu",
|
|
20
|
+
f"{main_url}/tur/komedi/page" : "Komedi",
|
|
21
|
+
f"{main_url}/tur/korku/page" : "Korku",
|
|
22
|
+
f"{main_url}/tur/macera/page" : "Macera",
|
|
23
|
+
f"{main_url}/tur/romantik/page" : "Romantik",
|
|
24
|
+
f"{main_url}/tur/suc/page" : "Suç",
|
|
25
|
+
f"{main_url}/tur/yerli-filmler/page" : "Yerli Filmler",
|
|
26
|
+
f"{main_url}/film-arsivi/page" : "Tüm Filmler",
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async def get_main_page(self, page: int, url: str, category: str) -> list[MainPageResult]:
|
|
30
|
+
target_url = f"{url}/{page}/"
|
|
31
|
+
istek = await self.httpx.get(target_url)
|
|
32
|
+
helper = HTMLHelper(istek.text)
|
|
33
|
+
|
|
34
|
+
items = helper.select("div.items article, #archive-content article")
|
|
35
|
+
results = []
|
|
36
|
+
|
|
37
|
+
for item in items:
|
|
38
|
+
title_el = helper.select_first("div.data h3 a, h3 a", item)
|
|
39
|
+
if not title_el: continue
|
|
40
|
+
|
|
41
|
+
title = title_el.text(strip=True)
|
|
42
|
+
href = self.fix_url(title_el.attrs.get("href"))
|
|
43
|
+
|
|
44
|
+
img_el = helper.select_first("img", item)
|
|
45
|
+
poster = self.fix_url(img_el.attrs.get("data-src") or img_el.attrs.get("src")) if img_el else None
|
|
46
|
+
|
|
47
|
+
results.append(MainPageResult(
|
|
48
|
+
category = category,
|
|
49
|
+
title = title,
|
|
50
|
+
url = href,
|
|
51
|
+
poster = poster
|
|
52
|
+
))
|
|
53
|
+
|
|
54
|
+
return results
|
|
55
|
+
|
|
56
|
+
async def search(self, query: str) -> list[SearchResult]:
|
|
57
|
+
url = f"{self.main_url}/?s={query}"
|
|
58
|
+
istek = await self.httpx.get(url)
|
|
59
|
+
helper = HTMLHelper(istek.text)
|
|
60
|
+
|
|
61
|
+
items = helper.select("div.result-item")
|
|
62
|
+
results = []
|
|
63
|
+
|
|
64
|
+
for item in items:
|
|
65
|
+
title_el = helper.select_first("div.title a", item)
|
|
66
|
+
if not title_el: continue
|
|
67
|
+
|
|
68
|
+
title = title_el.text(strip=True)
|
|
69
|
+
href = self.fix_url(title_el.attrs.get("href"))
|
|
70
|
+
|
|
71
|
+
img_el = helper.select_first("div.image img", item)
|
|
72
|
+
poster = self.fix_url(img_el.attrs.get("src")) if img_el else None
|
|
73
|
+
|
|
74
|
+
results.append(SearchResult(
|
|
75
|
+
title = title,
|
|
76
|
+
url = href,
|
|
77
|
+
poster = poster
|
|
78
|
+
))
|
|
79
|
+
|
|
80
|
+
return results
|
|
81
|
+
|
|
82
|
+
async def load_item(self, url: str) -> MovieInfo:
|
|
83
|
+
istek = await self.httpx.get(url)
|
|
84
|
+
helper = HTMLHelper(istek.text)
|
|
85
|
+
|
|
86
|
+
title = helper.select_text("div.data h1, h1") or "Bilinmiyor"
|
|
87
|
+
|
|
88
|
+
poster_el = helper.select_first("div.poster img")
|
|
89
|
+
poster = self.fix_url(poster_el.attrs.get("src")) if poster_el else None
|
|
90
|
+
if not poster:
|
|
91
|
+
poster = helper.select_attr("meta[property='og:image']", "content")
|
|
92
|
+
|
|
93
|
+
description = helper.select_text("div.wp-content p")
|
|
94
|
+
if not description:
|
|
95
|
+
description = helper.select_attr("meta[property='og:description']", "content")
|
|
96
|
+
|
|
97
|
+
year_text = helper.select_text("span.date")
|
|
98
|
+
year = year_text.strip()[-4:] if year_text else None
|
|
99
|
+
|
|
100
|
+
score_text = helper.select_text("span.dt_rating_vmanual")
|
|
101
|
+
rating = score_text.strip() if score_text else None
|
|
102
|
+
|
|
103
|
+
tags = helper.select_all_text("div.sgeneros a")
|
|
104
|
+
|
|
105
|
+
# Actors
|
|
106
|
+
actors_list = []
|
|
107
|
+
actor_els = helper.select("div.person")
|
|
108
|
+
for el in actor_els:
|
|
109
|
+
name = helper.select_text("div.name a", el)
|
|
110
|
+
if name:
|
|
111
|
+
actors_list.append(name.strip())
|
|
112
|
+
actors = ", ".join(actors_list) if actors_list else None
|
|
113
|
+
|
|
114
|
+
return MovieInfo(
|
|
115
|
+
url = url,
|
|
116
|
+
title = title,
|
|
117
|
+
description = description,
|
|
118
|
+
poster = poster,
|
|
119
|
+
year = year,
|
|
120
|
+
rating = rating,
|
|
121
|
+
tags = tags,
|
|
122
|
+
actors = actors
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
async def load_links(self, url: str) -> list[ExtractResult]:
|
|
126
|
+
istek = await self.httpx.get(url)
|
|
127
|
+
html = istek.text
|
|
128
|
+
helper = HTMLHelper(html)
|
|
129
|
+
|
|
130
|
+
# Get Post ID from body class usually "postid-123"
|
|
131
|
+
body_class = helper.select_attr("body", "class") or ""
|
|
132
|
+
post_id_match = re.search(r"postid-(\d+)", body_class)
|
|
133
|
+
|
|
134
|
+
results = []
|
|
135
|
+
|
|
136
|
+
if post_id_match:
|
|
137
|
+
post_id = post_id_match.group(1)
|
|
138
|
+
|
|
139
|
+
# AJAX request for player
|
|
140
|
+
ajax_url = f"{self.main_url}/wp-admin/admin-ajax.php"
|
|
141
|
+
data = {
|
|
142
|
+
"action": "doo_player_ajax",
|
|
143
|
+
"post": post_id,
|
|
144
|
+
"nume": "1", # Usually implies source number 1? Kotlin uses "1" hardcoded.
|
|
145
|
+
"type": "movie"
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
headers = {
|
|
149
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
150
|
+
"Referer": url,
|
|
151
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
try:
|
|
155
|
+
# Need to use post with data
|
|
156
|
+
player_resp = await self.httpx.post(ajax_url, data=data, headers=headers)
|
|
157
|
+
|
|
158
|
+
# Kotlin parses it as text and cleans slashes
|
|
159
|
+
content = player_resp.text.replace(r"\/", "/")
|
|
160
|
+
|
|
161
|
+
# Regex for URL
|
|
162
|
+
# Kotlin: (?:src|url)["']?\s*[:=]\s*["']([^"']+)["']
|
|
163
|
+
src_match = re.search(r'(?:src|url)["\']?\s*[:=]\s*["\']([^"\']+)["\']', content)
|
|
164
|
+
|
|
165
|
+
if src_match:
|
|
166
|
+
iframe_url = src_match.group(1)
|
|
167
|
+
if iframe_url.startswith("/"):
|
|
168
|
+
iframe_url = self.main_url + iframe_url
|
|
169
|
+
|
|
170
|
+
iframe_url = self.fix_url(iframe_url)
|
|
171
|
+
|
|
172
|
+
extracted = await self.extract(iframe_url)
|
|
173
|
+
if extracted:
|
|
174
|
+
if isinstance(extracted, list):
|
|
175
|
+
results.extend(extracted)
|
|
176
|
+
else:
|
|
177
|
+
results.append(extracted)
|
|
178
|
+
else:
|
|
179
|
+
results.append(ExtractResult(
|
|
180
|
+
name = "Filmatek | External",
|
|
181
|
+
url = iframe_url,
|
|
182
|
+
referer = url
|
|
183
|
+
))
|
|
184
|
+
except Exception as e:
|
|
185
|
+
# print(f"Filmatek Error: {e}")
|
|
186
|
+
pass
|
|
187
|
+
|
|
188
|
+
return results
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, SeriesInfo, Episode, ExtractResult, HTMLHelper
|
|
4
|
+
import re
|
|
5
|
+
|
|
6
|
+
class Full4kizle(PluginBase):
|
|
7
|
+
name = "Full4kizle"
|
|
8
|
+
language = "tr"
|
|
9
|
+
main_url = "https://izlehdfilm.cc"
|
|
10
|
+
favicon = f"https://www.google.com/s2/favicons?domain={main_url}&sz=64"
|
|
11
|
+
description = "Filmci Baba, film izleme sitesi 4k Full film izle, 1080p ve 4k kalite de sinema filmleri ve dizileri, tek parça hd kalitede türkçe dublajlı filmler seyret."
|
|
12
|
+
|
|
13
|
+
main_page = {
|
|
14
|
+
f"{main_url}/Kategori/en-populer-filmler/page" : "En Popüler Filmler",
|
|
15
|
+
f"{main_url}/Kategori/vizyondaki-filmler-izle/page" : "Vizyondaki Filmler",
|
|
16
|
+
f"{main_url}/Kategori/yerli-filmler-izle/page" : "Yerli Filmler",
|
|
17
|
+
f"{main_url}/Kategori/yabanci-diziler/page" : "Yabancı Diziler",
|
|
18
|
+
f"{main_url}/Kategori/netflix-filmleri-izle/page" : "Netflix Filmleri",
|
|
19
|
+
f"{main_url}/Kategori/netflix-dizileri/page" : "Netflix Dizileri",
|
|
20
|
+
f"{main_url}/Kategori/anime-izle/page" : "Anime İzle",
|
|
21
|
+
f"{main_url}/Kategori/cizgi-filmler/page" : "Çizgi Filmler",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async def get_main_page(self, page: int, url: str, category: str) -> list[MainPageResult]:
|
|
25
|
+
target_url = f"{url}/{page}/"
|
|
26
|
+
istek = await self.httpx.get(target_url)
|
|
27
|
+
helper = HTMLHelper(istek.text)
|
|
28
|
+
|
|
29
|
+
items = helper.select("div.movie-preview")
|
|
30
|
+
results = []
|
|
31
|
+
|
|
32
|
+
for item in items:
|
|
33
|
+
title_el = helper.select_first(".movie-title a", item)
|
|
34
|
+
if not title_el: continue
|
|
35
|
+
|
|
36
|
+
title = title_el.text(strip=True)
|
|
37
|
+
# Remove " izle" case insensitive
|
|
38
|
+
title = re.sub(r"(?i) izle", "", title).strip()
|
|
39
|
+
|
|
40
|
+
href = self.fix_url(title_el.attrs.get("href"))
|
|
41
|
+
|
|
42
|
+
poster_el = helper.select_first(".movie-poster img", item)
|
|
43
|
+
poster = self.fix_url(poster_el.attrs.get("src")) if poster_el else None
|
|
44
|
+
|
|
45
|
+
results.append(MainPageResult(
|
|
46
|
+
category = category,
|
|
47
|
+
title = title,
|
|
48
|
+
url = href,
|
|
49
|
+
poster = poster
|
|
50
|
+
))
|
|
51
|
+
|
|
52
|
+
return results
|
|
53
|
+
|
|
54
|
+
async def search(self, query: str) -> list[SearchResult]:
|
|
55
|
+
url = f"{self.main_url}/?s={query}"
|
|
56
|
+
istek = await self.httpx.get(url)
|
|
57
|
+
helper = HTMLHelper(istek.text)
|
|
58
|
+
|
|
59
|
+
items = helper.select("div.movie-preview")
|
|
60
|
+
results = []
|
|
61
|
+
|
|
62
|
+
for item in items:
|
|
63
|
+
title_el = helper.select_first(".movie-title a", item)
|
|
64
|
+
if not title_el: continue
|
|
65
|
+
|
|
66
|
+
title = title_el.text(strip=True)
|
|
67
|
+
# Remove " izle" case insensitive
|
|
68
|
+
title = re.sub(r"(?i) izle", "", title).strip()
|
|
69
|
+
|
|
70
|
+
href = self.fix_url(title_el.attrs.get("href"))
|
|
71
|
+
|
|
72
|
+
poster_el = helper.select_first(".movie-poster img", item)
|
|
73
|
+
poster = self.fix_url(poster_el.attrs.get("src")) if poster_el else None
|
|
74
|
+
|
|
75
|
+
results.append(SearchResult(
|
|
76
|
+
title = title,
|
|
77
|
+
url = href,
|
|
78
|
+
poster = poster
|
|
79
|
+
))
|
|
80
|
+
|
|
81
|
+
return results
|
|
82
|
+
|
|
83
|
+
async def load_item(self, url: str) -> MovieInfo | SeriesInfo:
|
|
84
|
+
istek = await self.httpx.get(url)
|
|
85
|
+
helper = HTMLHelper(istek.text)
|
|
86
|
+
|
|
87
|
+
title_raw = helper.select_text("h1") or "Bilinmiyor"
|
|
88
|
+
title = re.sub(r"(?i)izle", "", title_raw).strip()
|
|
89
|
+
|
|
90
|
+
poster_el = helper.select_first(".poster img")
|
|
91
|
+
poster = self.fix_url(poster_el.attrs.get("src")) if poster_el else None
|
|
92
|
+
|
|
93
|
+
description = helper.select_text(".excerpt p")
|
|
94
|
+
|
|
95
|
+
year_text = helper.select_text(".release a")
|
|
96
|
+
year = year_text.strip() if year_text else None
|
|
97
|
+
|
|
98
|
+
rating_text = helper.select_text(".imdb-rating")
|
|
99
|
+
rating = None
|
|
100
|
+
if rating_text:
|
|
101
|
+
rating_text = rating_text.replace("IMDB Puanı", "").strip()
|
|
102
|
+
rating = rating_text
|
|
103
|
+
|
|
104
|
+
# Check for Episodes to decide if Series or Movie
|
|
105
|
+
ep_elements = helper.select(".parts-middle a, .parts-middle .part.active")
|
|
106
|
+
|
|
107
|
+
if not ep_elements:
|
|
108
|
+
# Movie
|
|
109
|
+
return MovieInfo(
|
|
110
|
+
url = url,
|
|
111
|
+
title = title,
|
|
112
|
+
description = description,
|
|
113
|
+
poster = poster,
|
|
114
|
+
year = year,
|
|
115
|
+
rating = rating,
|
|
116
|
+
tags = None, # Tags usually in genres list, implementation skipped for now or add if easy
|
|
117
|
+
actors = None # Actors not extracted in Kotlin reference provided
|
|
118
|
+
)
|
|
119
|
+
else:
|
|
120
|
+
# Series
|
|
121
|
+
episodes = []
|
|
122
|
+
for i, el in enumerate(ep_elements):
|
|
123
|
+
ep_name = helper.select_text(".part-name", el) or f"Bölüm {i+1}"
|
|
124
|
+
ep_href = el.attrs.get("href")
|
|
125
|
+
if not ep_href:
|
|
126
|
+
ep_href = url # Current page if href is empty/active?
|
|
127
|
+
ep_href = self.fix_url(ep_href)
|
|
128
|
+
|
|
129
|
+
# Parse season/episode from name if possible
|
|
130
|
+
# Kotlin: find digit for season, substringAfter("Sezon") digit for episode
|
|
131
|
+
season = 1
|
|
132
|
+
episode = i + 1
|
|
133
|
+
|
|
134
|
+
# Simple heuristic similar to Kotlin
|
|
135
|
+
# "1. Sezon 5. Bölüm"
|
|
136
|
+
s_match = re.search(r"(\d+)\.\s*Sezon", ep_name)
|
|
137
|
+
e_match = re.search(r"(\d+)\.\s*Bölüm", ep_name)
|
|
138
|
+
|
|
139
|
+
if s_match:
|
|
140
|
+
season = int(s_match.group(1))
|
|
141
|
+
if e_match:
|
|
142
|
+
episode = int(e_match.group(1))
|
|
143
|
+
|
|
144
|
+
episodes.append(Episode(
|
|
145
|
+
season = season,
|
|
146
|
+
episode = episode,
|
|
147
|
+
title = ep_name,
|
|
148
|
+
url = ep_href
|
|
149
|
+
))
|
|
150
|
+
|
|
151
|
+
return SeriesInfo(
|
|
152
|
+
url = url,
|
|
153
|
+
title = title,
|
|
154
|
+
description = description,
|
|
155
|
+
poster = poster,
|
|
156
|
+
year = year,
|
|
157
|
+
rating = rating,
|
|
158
|
+
tags = None,
|
|
159
|
+
actors = None,
|
|
160
|
+
episodes = episodes
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
async def load_links(self, url: str) -> list[ExtractResult]:
|
|
164
|
+
istek = await self.httpx.get(url)
|
|
165
|
+
helper = HTMLHelper(istek.text)
|
|
166
|
+
|
|
167
|
+
iframe = helper.select_attr(".center-container iframe", "src")
|
|
168
|
+
if not iframe:
|
|
169
|
+
iframe = helper.select_attr("iframe[src*='hotstream.club']", "src")
|
|
170
|
+
|
|
171
|
+
results = []
|
|
172
|
+
|
|
173
|
+
if iframe:
|
|
174
|
+
iframe = self.fix_url(iframe)
|
|
175
|
+
|
|
176
|
+
# Use general extract method
|
|
177
|
+
extracted = await self.extract(iframe)
|
|
178
|
+
if extracted:
|
|
179
|
+
if isinstance(extracted, list):
|
|
180
|
+
results.extend(extracted)
|
|
181
|
+
else:
|
|
182
|
+
results.append(extracted)
|
|
183
|
+
else:
|
|
184
|
+
results.append(ExtractResult(
|
|
185
|
+
name = "Full4kizle | External",
|
|
186
|
+
url = iframe,
|
|
187
|
+
referer = url
|
|
188
|
+
))
|
|
189
|
+
|
|
190
|
+
return results
|
KekikStream/Plugins/RecTV.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from KekikStream.Core import PluginBase, MainPageResult, SearchResult, MovieInfo, Episode, SeriesInfo, ExtractResult, HTMLHelper
|
|
4
4
|
from json import dumps, loads
|
|
5
|
+
import re
|
|
5
6
|
|
|
6
7
|
class RecTV(PluginBase):
|
|
7
8
|
name = "RecTV"
|
|
@@ -75,26 +76,38 @@ class RecTV(PluginBase):
|
|
|
75
76
|
|
|
76
77
|
episodes = []
|
|
77
78
|
for season in dizi_veri:
|
|
79
|
+
season_title = season.get("title", "").strip()
|
|
78
80
|
for episode in season.get("episodes"):
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
81
|
+
ep_label = episode.get("title", "").strip()
|
|
82
|
+
for source in episode.get("sources"):
|
|
83
|
+
# Bölüm için gerekli bilgileri JSON olarak sakla
|
|
84
|
+
ep_data = {
|
|
85
|
+
"url" : self.fix_url(source.get("url")),
|
|
86
|
+
"title" : f"{veri.get('title')} | {season_title} {ep_label} - {source.get('title')}",
|
|
87
|
+
"is_episode" : True
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
# Extract season/episode numbers using helper
|
|
91
|
+
s1, _ = HTMLHelper.extract_season_episode(season_title or "")
|
|
92
|
+
_, e2 = HTMLHelper.extract_season_episode(ep_label or "")
|
|
93
|
+
|
|
94
|
+
tag = ""
|
|
95
|
+
clean_season = season_title
|
|
96
|
+
if "dublaj" in season_title.lower():
|
|
97
|
+
tag = " (Dublaj)"
|
|
98
|
+
clean_season = re.sub(r"\s*dublaj\s*", "", season_title, flags=re.I).strip()
|
|
99
|
+
elif any(x in season_title.lower() for x in ["altyazı", "altyazi"]):
|
|
100
|
+
tag = " (Altyazı)"
|
|
101
|
+
clean_season = re.sub(r"\s*altyaz[ıi]\s*", "", season_title, flags=re.I).strip()
|
|
102
|
+
|
|
103
|
+
ep_model = Episode(
|
|
104
|
+
season = s1 or 1,
|
|
105
|
+
episode = e2 or 1,
|
|
106
|
+
title = f"{clean_season} {ep_label}{tag} - {source.get('title')}",
|
|
107
|
+
url = dumps(ep_data),
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
episodes.append(ep_model)
|
|
98
111
|
|
|
99
112
|
# Süreyi dakikaya çevir (Örn: "1h 59min")
|
|
100
113
|
duration_raw = veri.get("duration")
|