KekikStream 1.7.2__py3-none-any.whl → 1.7.3__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/DzenRu.py +39 -0
- KekikStream/Extractors/ExPlay.py +54 -0
- KekikStream/Extractors/FirePlayer.py +61 -0
- KekikStream/Extractors/HDPlayerSystem.py +42 -0
- KekikStream/Extractors/JetTv.py +47 -0
- KekikStream/Extractors/MixTiger.py +61 -0
- KekikStream/Extractors/PlayerFilmIzle.py +63 -0
- KekikStream/Extractors/SetPlay.py +58 -0
- KekikStream/Extractors/SetPrime.py +46 -0
- KekikStream/Extractors/TurkeyPlayer.py +35 -0
- KekikStream/Extractors/VidHide.py +73 -0
- KekikStream/Extractors/VidPapi.py +90 -0
- KekikStream/Extractors/VidStack.py +75 -0
- KekikStream/Extractors/YildizKisaFilm.py +42 -0
- KekikStream/Plugins/Dizilla.py +5 -1
- KekikStream/Plugins/FilmBip.py +145 -0
- KekikStream/Plugins/FullHDFilm.py +164 -0
- KekikStream/Plugins/JetFilmizle.py +10 -3
- KekikStream/Plugins/KultFilmler.py +219 -0
- KekikStream/Plugins/RoketDizi.py +204 -0
- KekikStream/Plugins/SelcukFlix.py +216 -0
- KekikStream/Plugins/SezonlukDizi.py +3 -0
- KekikStream/Plugins/Sinefy.py +214 -0
- KekikStream/Plugins/Sinezy.py +99 -0
- KekikStream/Plugins/SuperFilmGeldi.py +121 -0
- {kekikstream-1.7.2.dist-info → kekikstream-1.7.3.dist-info}/METADATA +1 -1
- {kekikstream-1.7.2.dist-info → kekikstream-1.7.3.dist-info}/RECORD +31 -9
- {kekikstream-1.7.2.dist-info → kekikstream-1.7.3.dist-info}/WHEEL +0 -0
- {kekikstream-1.7.2.dist-info → kekikstream-1.7.3.dist-info}/entry_points.txt +0 -0
- {kekikstream-1.7.2.dist-info → kekikstream-1.7.3.dist-info}/licenses/LICENSE +0 -0
- {kekikstream-1.7.2.dist-info → kekikstream-1.7.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult
|
|
4
|
+
import re
|
|
5
|
+
|
|
6
|
+
class DzenRu(ExtractorBase):
|
|
7
|
+
name = "DzenRu"
|
|
8
|
+
main_url = "https://dzen.ru"
|
|
9
|
+
|
|
10
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
|
11
|
+
video_key = url.split("/")[-1]
|
|
12
|
+
video_url = f"{self.main_url}/embed/{video_key}"
|
|
13
|
+
|
|
14
|
+
if referer:
|
|
15
|
+
self.cffi.headers.update({"Referer": referer})
|
|
16
|
+
|
|
17
|
+
istek = await self.cffi.get(video_url)
|
|
18
|
+
istek.raise_for_status()
|
|
19
|
+
|
|
20
|
+
# okcdn.ru linklerini bul
|
|
21
|
+
matches = re.findall(r'https://vd\d+\.okcdn\.ru/\?[^"\'\\\s]+', istek.text)
|
|
22
|
+
|
|
23
|
+
if not matches:
|
|
24
|
+
raise ValueError("DzenRu video link not found")
|
|
25
|
+
|
|
26
|
+
# Benzersiz linkleri al, son kaliteyi kullan
|
|
27
|
+
unique_links = list(set(matches))
|
|
28
|
+
best_link = unique_links[-1] if unique_links else None
|
|
29
|
+
|
|
30
|
+
if not best_link:
|
|
31
|
+
raise ValueError("No valid video URL found")
|
|
32
|
+
|
|
33
|
+
return ExtractResult(
|
|
34
|
+
name = self.name,
|
|
35
|
+
url = best_link,
|
|
36
|
+
referer = self.main_url,
|
|
37
|
+
headers = {},
|
|
38
|
+
subtitles = []
|
|
39
|
+
)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle
|
|
4
|
+
import re
|
|
5
|
+
from urllib.parse import urlparse, parse_qs
|
|
6
|
+
|
|
7
|
+
class ExPlay(ExtractorBase):
|
|
8
|
+
name = "ExPlay"
|
|
9
|
+
main_url = "https://explay.store"
|
|
10
|
+
|
|
11
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
|
12
|
+
ext_ref = referer or ""
|
|
13
|
+
|
|
14
|
+
# URL parsing for partKey
|
|
15
|
+
parsed = urlparse(url)
|
|
16
|
+
params = parse_qs(parsed.query)
|
|
17
|
+
part_key = params.get("partKey", [""])[0]
|
|
18
|
+
clean_url = url.split("?partKey=")[0]
|
|
19
|
+
|
|
20
|
+
if referer:
|
|
21
|
+
self.cffi.headers.update({"Referer": referer})
|
|
22
|
+
|
|
23
|
+
istek = await self.cffi.get(clean_url)
|
|
24
|
+
istek.raise_for_status()
|
|
25
|
+
|
|
26
|
+
# videoUrl çıkar
|
|
27
|
+
video_url_match = re.search(r'videoUrl":"([^",]+)"', istek.text)
|
|
28
|
+
if not video_url_match:
|
|
29
|
+
raise ValueError("videoUrl not found")
|
|
30
|
+
video_url = video_url_match[1].replace("\\", "")
|
|
31
|
+
|
|
32
|
+
# videoServer çıkar
|
|
33
|
+
video_server_match = re.search(r'videoServer":"([^",]+)"', istek.text)
|
|
34
|
+
if not video_server_match:
|
|
35
|
+
raise ValueError("videoServer not found")
|
|
36
|
+
video_server = video_server_match[1]
|
|
37
|
+
|
|
38
|
+
# title çıkar
|
|
39
|
+
title_match = re.search(r'title":"([^",]+)"', istek.text)
|
|
40
|
+
title = title_match[1].split(".")[-1] if title_match else "Unknown"
|
|
41
|
+
|
|
42
|
+
if part_key and "turkce" in part_key.lower():
|
|
43
|
+
title = part_key # Or nicer formatting like SetPlay
|
|
44
|
+
|
|
45
|
+
# M3U8 link oluştur
|
|
46
|
+
m3u_link = f"{self.main_url}{video_url}?s={video_server}"
|
|
47
|
+
|
|
48
|
+
return ExtractResult(
|
|
49
|
+
name = f"{self.name} - {title}",
|
|
50
|
+
url = m3u_link,
|
|
51
|
+
referer = clean_url,
|
|
52
|
+
headers = {},
|
|
53
|
+
subtitles = []
|
|
54
|
+
)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult
|
|
4
|
+
from Kekik.Sifreleme import Packer
|
|
5
|
+
import re
|
|
6
|
+
|
|
7
|
+
class FirePlayer(ExtractorBase):
|
|
8
|
+
name = "FirePlayer"
|
|
9
|
+
main_url = "https://Player.filmizle.in"
|
|
10
|
+
|
|
11
|
+
def can_handle_url(self, url: str) -> bool:
|
|
12
|
+
return "filmizle.in" in url or "fireplayer" in url.lower()
|
|
13
|
+
|
|
14
|
+
async def extract(self, url: str, referer: str = None) -> ExtractResult:
|
|
15
|
+
if not referer:
|
|
16
|
+
referer = "https://sinezy.site/"
|
|
17
|
+
|
|
18
|
+
headers = {
|
|
19
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
|
|
20
|
+
"Referer": referer
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
istek = await self.cffi.get(url, headers=headers)
|
|
24
|
+
|
|
25
|
+
# Unpack usage similar to VidMoxy / suggestion
|
|
26
|
+
# Find the packed code block
|
|
27
|
+
match = re.search(r'(eval\(function\(p,a,c,k,e,d\)[\s\S]+?)\s*</script>', istek.text)
|
|
28
|
+
if match:
|
|
29
|
+
packed_code = match.group(1)
|
|
30
|
+
unpacked = Packer.unpack(packed_code)
|
|
31
|
+
else:
|
|
32
|
+
unpacked = istek.text
|
|
33
|
+
|
|
34
|
+
# Normalize escaped slashes
|
|
35
|
+
unpacked = unpacked.replace(r"\/", "/")
|
|
36
|
+
|
|
37
|
+
video_url = None
|
|
38
|
+
|
|
39
|
+
# Look for .mp4 or .m3u8 urls directly first
|
|
40
|
+
url_match = re.search(r'(https?://[^"\'\s]+\.(?:mp4|m3u8))', unpacked)
|
|
41
|
+
if url_match:
|
|
42
|
+
video_url = url_match.group(1)
|
|
43
|
+
|
|
44
|
+
if not video_url:
|
|
45
|
+
# Fallback: find all 'file': '...' and pick best
|
|
46
|
+
files = re.findall(r'file\s*:\s*["\']([^"\']+)["\']', unpacked)
|
|
47
|
+
for f in files:
|
|
48
|
+
if f.strip() and not f.endswith(".jpg") and not f.endswith(".png") and not f.endswith(".vtt"):
|
|
49
|
+
video_url = f
|
|
50
|
+
break
|
|
51
|
+
|
|
52
|
+
if not video_url:
|
|
53
|
+
raise ValueError("Could not find video URL in unpacked content")
|
|
54
|
+
|
|
55
|
+
return ExtractResult(
|
|
56
|
+
name = self.name,
|
|
57
|
+
url = video_url,
|
|
58
|
+
referer = url,
|
|
59
|
+
headers = headers
|
|
60
|
+
)
|
|
61
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult
|
|
4
|
+
|
|
5
|
+
class HDPlayerSystem(ExtractorBase):
|
|
6
|
+
name = "HDPlayerSystem"
|
|
7
|
+
main_url = "https://hdplayersystem.com"
|
|
8
|
+
|
|
9
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
|
10
|
+
ext_ref = referer or ""
|
|
11
|
+
|
|
12
|
+
if "video/" in url:
|
|
13
|
+
vid_id = url.split("video/")[-1]
|
|
14
|
+
else:
|
|
15
|
+
vid_id = url.split("?data=")[-1]
|
|
16
|
+
|
|
17
|
+
post_url = f"{self.main_url}/player/index.php?data={vid_id}&do=getVideo"
|
|
18
|
+
|
|
19
|
+
response = await self.cffi.post(
|
|
20
|
+
url = post_url,
|
|
21
|
+
data = {"hash": vid_id, "r": ext_ref},
|
|
22
|
+
headers = {
|
|
23
|
+
"Referer" : ext_ref,
|
|
24
|
+
"Content-Type" : "application/x-www-form-urlencoded; charset=UTF-8",
|
|
25
|
+
"X-Requested-With" : "XMLHttpRequest"
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
response.raise_for_status()
|
|
29
|
+
|
|
30
|
+
video_data = response.json()
|
|
31
|
+
m3u_link = video_data.get("securedLink")
|
|
32
|
+
|
|
33
|
+
if not m3u_link:
|
|
34
|
+
raise ValueError("securedLink not found in response")
|
|
35
|
+
|
|
36
|
+
return ExtractResult(
|
|
37
|
+
name = self.name,
|
|
38
|
+
url = m3u_link,
|
|
39
|
+
referer = url,
|
|
40
|
+
headers = {},
|
|
41
|
+
subtitles = []
|
|
42
|
+
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle
|
|
4
|
+
import re, json
|
|
5
|
+
|
|
6
|
+
class JetTv(ExtractorBase):
|
|
7
|
+
name = "JetTv"
|
|
8
|
+
main_url = "https://jetv.xyz"
|
|
9
|
+
requires_referer = False
|
|
10
|
+
|
|
11
|
+
async def extract(self, url: str, referer: str = None) -> ExtractResult:
|
|
12
|
+
istek = await self.cffi.get(url)
|
|
13
|
+
document = istek.text
|
|
14
|
+
|
|
15
|
+
# 1. Yöntem: API üzerinden alma
|
|
16
|
+
master_url = ""
|
|
17
|
+
final_ref = f"{self.main_url}/"
|
|
18
|
+
|
|
19
|
+
if "id=" in url:
|
|
20
|
+
vid_id = url.split("id=")[-1]
|
|
21
|
+
api_url = f"https://jetv.xyz/apollo/get_video.php?id={vid_id}"
|
|
22
|
+
try:
|
|
23
|
+
# Referer olarak video sayfasının kendisi gönderilmeli
|
|
24
|
+
api_resp = await self.cffi.get(api_url, headers={"Referer": url})
|
|
25
|
+
api_json = api_resp.json()
|
|
26
|
+
|
|
27
|
+
if api_json.get("success"):
|
|
28
|
+
master_url = api_json.get("masterUrl", "")
|
|
29
|
+
final_ref = api_json.get("referrerUrl") or final_ref
|
|
30
|
+
except Exception:
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
# 2. Yöntem: Regex Fallback
|
|
34
|
+
if not master_url:
|
|
35
|
+
if match := re.search(r"file: '([^']*)'", document, re.IGNORE_CASE):
|
|
36
|
+
master_url = match.group(1)
|
|
37
|
+
|
|
38
|
+
if not master_url:
|
|
39
|
+
raise ValueError(f"JetTv: Video kaynağı bulunamadı. {url}")
|
|
40
|
+
|
|
41
|
+
return ExtractResult(
|
|
42
|
+
name = self.name,
|
|
43
|
+
url = master_url,
|
|
44
|
+
referer = final_ref,
|
|
45
|
+
headers = {},
|
|
46
|
+
subtitles = []
|
|
47
|
+
)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult
|
|
4
|
+
|
|
5
|
+
class MixTiger(ExtractorBase):
|
|
6
|
+
name = "MixTiger"
|
|
7
|
+
main_url = "https://www.mixtiger.com"
|
|
8
|
+
|
|
9
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
|
10
|
+
ext_ref = referer or ""
|
|
11
|
+
post_url = f"{url}?do=getVideo"
|
|
12
|
+
vid_id = url.split("video/")[-1] if "video/" in url else ""
|
|
13
|
+
|
|
14
|
+
response = await self.cffi.post(
|
|
15
|
+
url = post_url,
|
|
16
|
+
data = {"hash": vid_id, "r": ext_ref, "s": ""},
|
|
17
|
+
headers = {
|
|
18
|
+
"Referer" : ext_ref,
|
|
19
|
+
"Content-Type" : "application/x-www-form-urlencoded; charset=UTF-8",
|
|
20
|
+
"X-Requested-With" : "XMLHttpRequest"
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
response.raise_for_status()
|
|
24
|
+
|
|
25
|
+
video_data = response.json()
|
|
26
|
+
|
|
27
|
+
# videoSrc varsa doğrudan kullan
|
|
28
|
+
if video_data.get("videoSrc"):
|
|
29
|
+
m3u_link = video_data["videoSrc"]
|
|
30
|
+
# videoSources listesi varsa son elemanı al
|
|
31
|
+
elif video_data.get("videoSources"):
|
|
32
|
+
sources = video_data["videoSources"]
|
|
33
|
+
m3u_link = sources[-1].get("file") if sources else None
|
|
34
|
+
else:
|
|
35
|
+
m3u_link = None
|
|
36
|
+
|
|
37
|
+
if not m3u_link:
|
|
38
|
+
raise ValueError("Video URL not found in response")
|
|
39
|
+
|
|
40
|
+
# disk.yandex için referer boş olmalı
|
|
41
|
+
final_referer = "" if "disk.yandex" in m3u_link else ext_ref
|
|
42
|
+
|
|
43
|
+
# Recursive extraction check
|
|
44
|
+
try:
|
|
45
|
+
from KekikStream.Core.Extractor.ExtractorManager import ExtractorManager
|
|
46
|
+
# Import inside method to avoid circular dependency
|
|
47
|
+
manager = ExtractorManager()
|
|
48
|
+
if nested_extractor := manager.find_extractor(m3u_link):
|
|
49
|
+
# Use recursive extraction
|
|
50
|
+
return await nested_extractor.extract(m3u_link, referer=final_referer)
|
|
51
|
+
except Exception:
|
|
52
|
+
# If recursion fails, fallback to standard result
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
return ExtractResult(
|
|
56
|
+
name = self.name,
|
|
57
|
+
url = m3u_link,
|
|
58
|
+
referer = final_referer,
|
|
59
|
+
headers = {},
|
|
60
|
+
subtitles = []
|
|
61
|
+
)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle
|
|
4
|
+
import re, json
|
|
5
|
+
|
|
6
|
+
class PlayerFilmIzle(ExtractorBase):
|
|
7
|
+
name = "PlayerFilmIzle"
|
|
8
|
+
main_url = "https://player.filmizle.in"
|
|
9
|
+
requires_referer = True
|
|
10
|
+
|
|
11
|
+
async def extract(self, url: str, referer: str = None) -> ExtractResult:
|
|
12
|
+
# Kotlin tarafında referer mainUrl olarak zorlanmış
|
|
13
|
+
ext_ref = self.main_url
|
|
14
|
+
self.cffi.headers.update({"Referer": ext_ref})
|
|
15
|
+
|
|
16
|
+
istek = await self.cffi.get(url)
|
|
17
|
+
video_req = istek.text
|
|
18
|
+
|
|
19
|
+
subtitles = []
|
|
20
|
+
if sub_match := re.search(r'playerjsSubtitle = "([^"]*)"', video_req, re.IGNORE_CASE):
|
|
21
|
+
sub_yakala = sub_match.group(1)
|
|
22
|
+
# Format örneği: [dil]url
|
|
23
|
+
# Kotlin kodunda: subYakala.substringAfter("]") -> url
|
|
24
|
+
# subYakala.substringBefore("]").removePrefix("[") -> lang
|
|
25
|
+
if "]" in sub_yakala:
|
|
26
|
+
sub_lang_raw, sub_url = sub_yakala.split("]", 1)
|
|
27
|
+
sub_lang = sub_lang_raw.replace("[", "")
|
|
28
|
+
subtitles.append(Subtitle(name=sub_lang, url=sub_url))
|
|
29
|
+
|
|
30
|
+
# Data yakalama: FirePlayer|DATA|...
|
|
31
|
+
data_match = re.search(r'FirePlayer\|([^|]+)\|', video_req, re.IGNORE_CASE)
|
|
32
|
+
data_val = data_match.group(1) if data_match else None
|
|
33
|
+
|
|
34
|
+
if not data_val:
|
|
35
|
+
raise ValueError("PlayerFilmIzle: Data bulunamadı")
|
|
36
|
+
|
|
37
|
+
url_post = f"{self.main_url}/player/index.php?data={data_val}&do=getVideo"
|
|
38
|
+
|
|
39
|
+
post_headers = {
|
|
40
|
+
"Referer": ext_ref,
|
|
41
|
+
"X-Requested-With": "XMLHttpRequest"
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# Kotlin'de post data: "hash" -> data, "r" -> ""
|
|
45
|
+
post_data = {"hash": data_val, "r": ""}
|
|
46
|
+
|
|
47
|
+
response = await self.cffi.post(url_post, data=post_data, headers=post_headers)
|
|
48
|
+
get_url = response.text.replace("\\", "")
|
|
49
|
+
|
|
50
|
+
m3u8_url = ""
|
|
51
|
+
if url_yakala := re.search(r'"securedLink":"([^"]*)"', get_url, re.IGNORE_CASE):
|
|
52
|
+
m3u8_url = url_yakala.group(1)
|
|
53
|
+
|
|
54
|
+
if not m3u8_url:
|
|
55
|
+
raise ValueError("PlayerFilmIzle: M3U8 linki bulunamadı")
|
|
56
|
+
|
|
57
|
+
return ExtractResult(
|
|
58
|
+
name = self.name,
|
|
59
|
+
url = m3u8_url,
|
|
60
|
+
referer = ext_ref,
|
|
61
|
+
headers = dict(self.cffi.headers),
|
|
62
|
+
subtitles = subtitles
|
|
63
|
+
)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult
|
|
4
|
+
import re
|
|
5
|
+
|
|
6
|
+
class SetPlay(ExtractorBase):
|
|
7
|
+
name = "SetPlay"
|
|
8
|
+
main_url = "https://setplay.cfd"
|
|
9
|
+
|
|
10
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
|
11
|
+
ext_ref = referer or ""
|
|
12
|
+
|
|
13
|
+
if referer:
|
|
14
|
+
self.cffi.headers.update({"Referer": referer})
|
|
15
|
+
|
|
16
|
+
istek = await self.cffi.get(url)
|
|
17
|
+
istek.raise_for_status()
|
|
18
|
+
|
|
19
|
+
# videoUrl çıkar
|
|
20
|
+
video_url_match = re.search(r'videoUrl":"([^",]+)"', istek.text)
|
|
21
|
+
if not video_url_match:
|
|
22
|
+
raise ValueError("videoUrl not found")
|
|
23
|
+
video_url = video_url_match[1].replace("\\", "")
|
|
24
|
+
|
|
25
|
+
# videoServer çıkar
|
|
26
|
+
video_server_match = re.search(r'videoServer":"([^",]+)"', istek.text)
|
|
27
|
+
if not video_server_match:
|
|
28
|
+
raise ValueError("videoServer not found")
|
|
29
|
+
video_server = video_server_match[1]
|
|
30
|
+
|
|
31
|
+
# title çıkar (opsiyonel)
|
|
32
|
+
title_match = re.search(r'title":"([^",]+)"', istek.text)
|
|
33
|
+
title_base = title_match[1].split(".")[-1] if title_match else "Unknown"
|
|
34
|
+
|
|
35
|
+
# partKey logic
|
|
36
|
+
from urllib.parse import urlparse, parse_qs
|
|
37
|
+
parsed = urlparse(url)
|
|
38
|
+
params = parse_qs(parsed.query)
|
|
39
|
+
part_key = params.get("partKey", [""])[0]
|
|
40
|
+
|
|
41
|
+
name_suffix = ""
|
|
42
|
+
if "turkcedublaj" in part_key.lower():
|
|
43
|
+
name_suffix = "Dublaj"
|
|
44
|
+
elif "turkcealtyazi" in part_key.lower():
|
|
45
|
+
name_suffix = "Altyazı"
|
|
46
|
+
else:
|
|
47
|
+
name_suffix = title_base
|
|
48
|
+
|
|
49
|
+
# M3U8 link oluştur
|
|
50
|
+
m3u_link = f"{self.main_url}{video_url}?s={video_server}"
|
|
51
|
+
|
|
52
|
+
return ExtractResult(
|
|
53
|
+
name = f"{self.name} - {name_suffix}",
|
|
54
|
+
url = m3u_link,
|
|
55
|
+
referer = url,
|
|
56
|
+
headers = {},
|
|
57
|
+
subtitles = []
|
|
58
|
+
)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult
|
|
4
|
+
from urllib.parse import urlparse, parse_qs
|
|
5
|
+
import re
|
|
6
|
+
|
|
7
|
+
class SetPrime(ExtractorBase):
|
|
8
|
+
name = "SetPrime"
|
|
9
|
+
main_url = "https://setplay.site"
|
|
10
|
+
|
|
11
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
|
12
|
+
# URL parsing
|
|
13
|
+
parsed = urlparse(url)
|
|
14
|
+
params = parse_qs(parsed.query)
|
|
15
|
+
part_key = params.get("partKey", [""])[0].upper()
|
|
16
|
+
clean_url = url.split("?partKey=")[0]
|
|
17
|
+
|
|
18
|
+
# POST URL: embed?i= -> embed/get?i=
|
|
19
|
+
post_url = clean_url.replace("embed?i=", "embed/get?i=")
|
|
20
|
+
|
|
21
|
+
response = await self.cffi.post(
|
|
22
|
+
url = post_url,
|
|
23
|
+
headers = {"Referer": clean_url}
|
|
24
|
+
)
|
|
25
|
+
response.raise_for_status()
|
|
26
|
+
|
|
27
|
+
# Links parse
|
|
28
|
+
links_match = re.search(r'Links":\["([^"\]]+)"', response.text)
|
|
29
|
+
if not links_match:
|
|
30
|
+
raise ValueError("Links not found in SetPrime response")
|
|
31
|
+
|
|
32
|
+
link_suffix = links_match.group(1)
|
|
33
|
+
if not link_suffix.startswith("/"):
|
|
34
|
+
raise ValueError("Links not valid (must start with /)")
|
|
35
|
+
|
|
36
|
+
m3u_link = f"{self.main_url}{link_suffix}"
|
|
37
|
+
|
|
38
|
+
display_name = f"{self.name} - {part_key}" if part_key else self.name
|
|
39
|
+
|
|
40
|
+
return ExtractResult(
|
|
41
|
+
name = display_name,
|
|
42
|
+
url = m3u_link,
|
|
43
|
+
referer = clean_url,
|
|
44
|
+
headers = {},
|
|
45
|
+
subtitles = []
|
|
46
|
+
)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle
|
|
4
|
+
import re, json
|
|
5
|
+
|
|
6
|
+
class TurkeyPlayer(ExtractorBase):
|
|
7
|
+
name = "TurkeyPlayer"
|
|
8
|
+
main_url = "https://watch.turkeyplayer.com/"
|
|
9
|
+
requires_referer = True
|
|
10
|
+
|
|
11
|
+
async def extract(self, url: str, referer: str = None) -> ExtractResult:
|
|
12
|
+
if referer:
|
|
13
|
+
self.cffi.headers.update({"Referer": referer})
|
|
14
|
+
|
|
15
|
+
istek = await self.cffi.get(url)
|
|
16
|
+
page_content = istek.text
|
|
17
|
+
|
|
18
|
+
video_json_match = re.search(r'var\s+video\s*=\s*(\{.*?\});', page_content, re.DOTALL)
|
|
19
|
+
if not video_json_match:
|
|
20
|
+
raise ValueError("TurkeyPlayer: Video JSON bulunamadı")
|
|
21
|
+
|
|
22
|
+
video_data = json.loads(video_json_match.group(1))
|
|
23
|
+
|
|
24
|
+
video_id = video_data.get("id")
|
|
25
|
+
video_md5 = video_data.get("md5")
|
|
26
|
+
|
|
27
|
+
master_url = f"https://watch.turkeyplayer.com/m3u8/8/{video_md5}/master.txt?s=1&id={video_id}&cache=1"
|
|
28
|
+
|
|
29
|
+
return ExtractResult(
|
|
30
|
+
name = self.name,
|
|
31
|
+
url = master_url,
|
|
32
|
+
referer = referer or url,
|
|
33
|
+
headers = dict(self.cffi.headers),
|
|
34
|
+
subtitles = []
|
|
35
|
+
)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle
|
|
4
|
+
from Kekik.Sifreleme import Packer
|
|
5
|
+
from parsel import Selector
|
|
6
|
+
import re
|
|
7
|
+
|
|
8
|
+
class VidHide(ExtractorBase):
|
|
9
|
+
name = "VidHide"
|
|
10
|
+
main_url = "https://vidhidepro.com"
|
|
11
|
+
requires_referer = True
|
|
12
|
+
|
|
13
|
+
def get_embed_url(self, url: str) -> str:
|
|
14
|
+
if "/d/" in url:
|
|
15
|
+
return url.replace("/d/", "/v/")
|
|
16
|
+
elif "/download/" in url:
|
|
17
|
+
return url.replace("/download/", "/v/")
|
|
18
|
+
elif "/file/" in url:
|
|
19
|
+
return url.replace("/file/", "/v/")
|
|
20
|
+
else:
|
|
21
|
+
return url.replace("/f/", "/v/")
|
|
22
|
+
|
|
23
|
+
async def extract(self, url: str, referer: str = None) -> ExtractResult:
|
|
24
|
+
if referer:
|
|
25
|
+
self.cffi.headers.update({"Referer": referer})
|
|
26
|
+
|
|
27
|
+
self.cffi.headers.update({
|
|
28
|
+
"Sec-Fetch-Dest" : "empty",
|
|
29
|
+
"Sec-Fetch-Mode" : "cors",
|
|
30
|
+
"Sec-Fetch-Site" : "cross-site",
|
|
31
|
+
"Origin" : self.main_url,
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
embed_url = self.get_embed_url(url)
|
|
35
|
+
istek = await self.cffi.get(embed_url)
|
|
36
|
+
response = istek.text
|
|
37
|
+
|
|
38
|
+
script = None
|
|
39
|
+
if "eval(function" in response:
|
|
40
|
+
try:
|
|
41
|
+
unpacked = Packer.unpack(response)
|
|
42
|
+
if "var links" in unpacked:
|
|
43
|
+
script = unpacked.split("var links")[1]
|
|
44
|
+
else:
|
|
45
|
+
script = unpacked
|
|
46
|
+
except Exception:
|
|
47
|
+
pass
|
|
48
|
+
|
|
49
|
+
if not script:
|
|
50
|
+
if matches := re.search(r'sources:\s*(\[.*?\])', response, re.DOTALL):
|
|
51
|
+
script = matches.group(1)
|
|
52
|
+
|
|
53
|
+
m3u8_url = None
|
|
54
|
+
if script:
|
|
55
|
+
# m3u8 urls could be prefixed by 'file:', 'hls2:' or 'hls4:', so we just match ':'
|
|
56
|
+
if match := re.search(r':\s*"([^"]*?m3u8[^"]*?)"', script):
|
|
57
|
+
m3u8_url = match.group(1)
|
|
58
|
+
|
|
59
|
+
if not m3u8_url:
|
|
60
|
+
# Fallback direct search in response if unpacking failed or structure changed
|
|
61
|
+
if match := re.search(r'file:"(.*?\.m3u8.*?)"', response):
|
|
62
|
+
m3u8_url = match.group(1)
|
|
63
|
+
|
|
64
|
+
if not m3u8_url:
|
|
65
|
+
raise ValueError(f"VidHide: Video URL bulunamadı. {url}")
|
|
66
|
+
|
|
67
|
+
return ExtractResult(
|
|
68
|
+
name = self.name,
|
|
69
|
+
url = self.fix_url(m3u8_url),
|
|
70
|
+
referer = f"{self.main_url}/",
|
|
71
|
+
headers = dict(self.cffi.headers),
|
|
72
|
+
subtitles = []
|
|
73
|
+
)
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle
|
|
4
|
+
import re
|
|
5
|
+
|
|
6
|
+
class VidPapi(ExtractorBase):
|
|
7
|
+
name = "VidApi"
|
|
8
|
+
main_url = "https://vidpapi.xyz"
|
|
9
|
+
|
|
10
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
|
11
|
+
ext_ref = referer or ""
|
|
12
|
+
|
|
13
|
+
# URL parsing
|
|
14
|
+
if "video/" in url:
|
|
15
|
+
vid_id = url.split("video/")[-1]
|
|
16
|
+
else:
|
|
17
|
+
vid_id = url.split("?data=")[-1]
|
|
18
|
+
|
|
19
|
+
# 1. Altyazıları çek
|
|
20
|
+
sub_url = f"{self.main_url}/player/index.php?data={vid_id}"
|
|
21
|
+
sub_headers = {
|
|
22
|
+
"Content-Type" : "application/x-www-form-urlencoded; charset=UTF-8",
|
|
23
|
+
"X-Requested-With" : "XMLHttpRequest",
|
|
24
|
+
"User-Agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0",
|
|
25
|
+
"Referer" : ext_ref or "https://kultfilmler.pro/"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
subtitles = []
|
|
29
|
+
try:
|
|
30
|
+
sub_istek = await self.cffi.post(
|
|
31
|
+
url = sub_url,
|
|
32
|
+
headers = sub_headers,
|
|
33
|
+
data = {"hash": vid_id, "r": "https://kultfilmler.pro/"}
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
subtitle_match = re.search(r'var playerjsSubtitle = "([^"]*)"', sub_istek.text, re.IGNORECASE)
|
|
37
|
+
if subtitle_match and subtitle_match.group(1):
|
|
38
|
+
raw_subs = subtitle_match.group(1)
|
|
39
|
+
|
|
40
|
+
found_subs = re.findall(r'\[(.*?)\](.*?)(?:,|$)', raw_subs)
|
|
41
|
+
for lang, sub_link in found_subs:
|
|
42
|
+
lang = lang.strip()
|
|
43
|
+
if "Türkçe" in lang:
|
|
44
|
+
lang_code = "tr"
|
|
45
|
+
lang_name = "Turkish"
|
|
46
|
+
elif "İngilizce" in lang:
|
|
47
|
+
lang_code = "en"
|
|
48
|
+
lang_name = "English"
|
|
49
|
+
else:
|
|
50
|
+
lang_code = lang[:2].lower()
|
|
51
|
+
lang_name = lang
|
|
52
|
+
|
|
53
|
+
subtitles.append(Subtitle(
|
|
54
|
+
name = lang_name,
|
|
55
|
+
url = sub_link.strip()
|
|
56
|
+
))
|
|
57
|
+
|
|
58
|
+
except Exception as e:
|
|
59
|
+
pass
|
|
60
|
+
|
|
61
|
+
# 2. Videoyu çek
|
|
62
|
+
video_url = f"{self.main_url}/player/index.php?data={vid_id}&do=getVideo"
|
|
63
|
+
video_headers = sub_headers.copy()
|
|
64
|
+
|
|
65
|
+
response = await self.cffi.post(
|
|
66
|
+
url = video_url,
|
|
67
|
+
headers = video_headers,
|
|
68
|
+
data = {"hash": vid_id, "r": "https://kultfilmler.pro/"}
|
|
69
|
+
)
|
|
70
|
+
response.raise_for_status()
|
|
71
|
+
|
|
72
|
+
try:
|
|
73
|
+
video_data = response.json()
|
|
74
|
+
except Exception:
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
stream_url = video_data.get("securedLink")
|
|
78
|
+
if not stream_url or not stream_url.strip():
|
|
79
|
+
stream_url = video_data.get("videoSource")
|
|
80
|
+
|
|
81
|
+
if not stream_url:
|
|
82
|
+
raise ValueError("No video link found in VidPapi response")
|
|
83
|
+
|
|
84
|
+
return ExtractResult(
|
|
85
|
+
name = self.name,
|
|
86
|
+
url = stream_url,
|
|
87
|
+
referer = ext_ref or self.main_url,
|
|
88
|
+
headers = {},
|
|
89
|
+
subtitles = subtitles
|
|
90
|
+
)
|