KekikStream 0.0.7__py3-none-any.whl → 0.2.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/CLI/__init__.py +2 -1
- KekikStream/CLI/check_update.py +33 -0
- KekikStream/Core/MediaHandler.py +7 -1
- KekikStream/Core/PluginBase.py +41 -4
- KekikStream/Core/PluginLoader.py +1 -1
- KekikStream/Core/PluginModels.py +46 -5
- KekikStream/Core/__init__.py +2 -2
- KekikStream/Extractors/PixelDrain.py +28 -0
- KekikStream/Extractors/RapidVid.py +61 -0
- KekikStream/Extractors/SibNet.py +29 -0
- KekikStream/Extractors/Sobreatsesuyp.py +60 -0
- KekikStream/Extractors/TRsTX.py +68 -0
- KekikStream/Extractors/TauVideo.py +33 -0
- KekikStream/Extractors/TurboImgz.py +28 -0
- KekikStream/Extractors/VidMoly.py +93 -0
- KekikStream/Extractors/VidMoxy.py +19 -2
- KekikStream/Managers/ExtractorManager.py +1 -1
- KekikStream/Managers/PluginManager.py +4 -3
- KekikStream/Managers/UIManager.py +14 -1
- KekikStream/Plugins/JetFilmizle.py +96 -0
- KekikStream/Plugins/SezonlukDizi.py +108 -0
- KekikStream/Plugins/SineWix.py +105 -0
- KekikStream/__init__.py +138 -26
- {KekikStream-0.0.7.dist-info → KekikStream-0.2.0.dist-info}/METADATA +6 -2
- KekikStream-0.2.0.dist-info/RECORD +41 -0
- KekikStream-0.0.7.dist-info/RECORD +0 -29
- {KekikStream-0.0.7.dist-info → KekikStream-0.2.0.dist-info}/LICENSE +0 -0
- {KekikStream-0.0.7.dist-info → KekikStream-0.2.0.dist-info}/WHEEL +0 -0
- {KekikStream-0.0.7.dist-info → KekikStream-0.2.0.dist-info}/entry_points.txt +0 -0
- {KekikStream-0.0.7.dist-info → KekikStream-0.2.0.dist-info}/top_level.txt +0 -0
KekikStream/CLI/__init__.py
CHANGED
@@ -1,3 +1,4 @@
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
2
|
|
3
|
-
from Kekik.cli
|
3
|
+
from Kekik.cli import konsol, cikis_yap, hata_salla, log_salla, hata_yakala, bellek_temizle, temizle
|
4
|
+
from .check_update import check_and_update_package
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
|
+
|
3
|
+
from . import konsol
|
4
|
+
from rich.panel import Panel
|
5
|
+
from pkg_resources import get_distribution
|
6
|
+
from requests import get
|
7
|
+
from subprocess import check_call
|
8
|
+
import sys
|
9
|
+
|
10
|
+
def check_and_update_package(package_name: str):
|
11
|
+
"""Paketi kontrol et ve gerekirse güncelle."""
|
12
|
+
try:
|
13
|
+
# Mevcut sürümü al
|
14
|
+
current_version = get_distribution(package_name).version
|
15
|
+
konsol.print(Panel(f"[cyan]Yüklü sürüm:[/cyan] [bold yellow]{current_version}[/bold yellow]"))
|
16
|
+
|
17
|
+
# PyPI'den en son sürümü al
|
18
|
+
response = get(f"https://pypi.org/pypi/{package_name}/json")
|
19
|
+
if response.status_code == 200:
|
20
|
+
latest_version = response.json()["info"]["version"]
|
21
|
+
konsol.print(Panel(f"[cyan]En son sürüm:[/cyan] [bold green]{latest_version}[/bold green]"))
|
22
|
+
|
23
|
+
# Eğer güncel değilse güncelle
|
24
|
+
if current_version != latest_version:
|
25
|
+
konsol.print(f"[bold red]{package_name} güncelleniyor...[/bold red]")
|
26
|
+
check_call([sys.executable, "-m", "pip", "install", "--upgrade", package_name, "--break-system-packages"])
|
27
|
+
konsol.print(f"[bold green]{package_name} güncellendi![/bold green]")
|
28
|
+
else:
|
29
|
+
konsol.print(f"[bold green]{package_name} zaten güncel.[/bold green]")
|
30
|
+
else:
|
31
|
+
konsol.print("[bold red]PyPI'ye erişilemiyor. Güncelleme kontrolü atlanıyor.[/bold red]")
|
32
|
+
except Exception as e:
|
33
|
+
konsol.print(f"[bold red]Güncelleme kontrolü sırasında hata oluştu: {e}[/bold red]")
|
KekikStream/Core/MediaHandler.py
CHANGED
@@ -11,7 +11,7 @@ class MediaHandler:
|
|
11
11
|
|
12
12
|
def play_with_vlc(self, extract_data: ExtractResult):
|
13
13
|
try:
|
14
|
-
if "Cookie" in self.headers:
|
14
|
+
if "Cookie" in self.headers or extract_data.subtitles:
|
15
15
|
self.play_with_mpv(extract_data)
|
16
16
|
return
|
17
17
|
|
@@ -27,6 +27,9 @@ class MediaHandler:
|
|
27
27
|
if "Referer" in self.headers:
|
28
28
|
vlc_command.append(f"--http-referrer={self.headers.get('Referer')}")
|
29
29
|
|
30
|
+
for subtitle in extract_data.subtitles:
|
31
|
+
vlc_command.append(f"--sub-file={subtitle.url}")
|
32
|
+
|
30
33
|
vlc_command.append(extract_data.url)
|
31
34
|
subprocess.run(vlc_command, check=True)
|
32
35
|
except subprocess.CalledProcessError as e:
|
@@ -52,6 +55,9 @@ class MediaHandler:
|
|
52
55
|
if "Cookie" in self.headers:
|
53
56
|
mpv_command.append(f"--http-header-fields=Cookie: {self.headers.get('Cookie')}")
|
54
57
|
|
58
|
+
for subtitle in extract_data.subtitles:
|
59
|
+
mpv_command.append(f"--sub-file={subtitle.url}")
|
60
|
+
|
55
61
|
mpv_command.append(extract_data.url)
|
56
62
|
subprocess.run(mpv_command, check=True)
|
57
63
|
except subprocess.CalledProcessError as e:
|
KekikStream/Core/PluginBase.py
CHANGED
@@ -3,10 +3,14 @@
|
|
3
3
|
from abc import ABC, abstractmethod
|
4
4
|
from httpx import AsyncClient, Timeout
|
5
5
|
from .PluginModels import SearchResult, MovieInfo
|
6
|
+
from .MediaHandler import MediaHandler
|
7
|
+
from urllib.parse import urljoin
|
8
|
+
import re
|
6
9
|
|
7
10
|
class PluginBase(ABC):
|
8
11
|
name = "Plugin"
|
9
12
|
main_url = "https://example.com"
|
13
|
+
_data = {}
|
10
14
|
|
11
15
|
def __init__(self):
|
12
16
|
self.oturum = AsyncClient(
|
@@ -16,6 +20,7 @@ class PluginBase(ABC):
|
|
16
20
|
},
|
17
21
|
timeout = Timeout(10.0),
|
18
22
|
)
|
23
|
+
self.media_handler = MediaHandler()
|
19
24
|
|
20
25
|
@abstractmethod
|
21
26
|
async def search(self, query: str) -> list[SearchResult]:
|
@@ -35,8 +40,40 @@ class PluginBase(ABC):
|
|
35
40
|
async def close(self):
|
36
41
|
await self.oturum.aclose()
|
37
42
|
|
38
|
-
def fix_url(self,
|
39
|
-
if
|
40
|
-
return
|
43
|
+
def fix_url(self, url: str) -> str:
|
44
|
+
if not url:
|
45
|
+
return ""
|
46
|
+
|
47
|
+
if url.startswith("http") or url.startswith("{\""):
|
48
|
+
return url
|
41
49
|
|
42
|
-
|
50
|
+
if url.startswith("//"):
|
51
|
+
return f"https:{url}"
|
52
|
+
|
53
|
+
return urljoin(self.main_url, url)
|
54
|
+
|
55
|
+
@staticmethod
|
56
|
+
def clean_title(title: str) -> str:
|
57
|
+
suffixes = [
|
58
|
+
" izle",
|
59
|
+
" full film",
|
60
|
+
" filmini full",
|
61
|
+
" full türkçe",
|
62
|
+
" alt yazılı",
|
63
|
+
" altyazılı",
|
64
|
+
" tr dublaj",
|
65
|
+
" hd türkçe",
|
66
|
+
" türkçe dublaj",
|
67
|
+
" yeşilçam ",
|
68
|
+
" erotik fil",
|
69
|
+
" türkçe",
|
70
|
+
" yerli",
|
71
|
+
" tüekçe dublaj",
|
72
|
+
]
|
73
|
+
|
74
|
+
cleaned_title = title.strip()
|
75
|
+
|
76
|
+
for suffix in suffixes:
|
77
|
+
cleaned_title = re.sub(f"{re.escape(suffix)}.*$", "", cleaned_title, flags=re.IGNORECASE).strip()
|
78
|
+
|
79
|
+
return cleaned_title
|
KekikStream/Core/PluginLoader.py
CHANGED
@@ -29,7 +29,7 @@ class PluginLoader:
|
|
29
29
|
if not plugins:
|
30
30
|
konsol.print("[yellow][!] Yüklenecek bir Plugin bulunamadı![/yellow]")
|
31
31
|
|
32
|
-
return plugins
|
32
|
+
return dict(sorted(plugins.items()))
|
33
33
|
|
34
34
|
def _load_from_directory(self, directory: Path) -> dict[str, PluginBase]:
|
35
35
|
plugins = {}
|
KekikStream/Core/PluginModels.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
2
|
|
3
|
-
from pydantic import BaseModel,
|
4
|
-
from typing import Optional
|
3
|
+
from pydantic import BaseModel, field_validator
|
4
|
+
from typing import List, Optional
|
5
5
|
|
6
6
|
|
7
7
|
class SearchResult(BaseModel):
|
@@ -23,10 +23,51 @@ class MovieInfo(BaseModel):
|
|
23
23
|
actors : Optional[str] = None
|
24
24
|
duration : Optional[int] = None
|
25
25
|
|
26
|
-
@
|
26
|
+
@field_validator("tags", mode="before")
|
27
|
+
@classmethod
|
27
28
|
def convert_tags(cls, value):
|
28
29
|
return ", ".join(value) if isinstance(value, list) else value
|
29
30
|
|
30
|
-
@
|
31
|
+
@field_validator("actors", mode="before")
|
32
|
+
@classmethod
|
31
33
|
def convert_actors(cls, value):
|
32
|
-
return ", ".join(value) if isinstance(value, list) else value
|
34
|
+
return ", ".join(value) if isinstance(value, list) else value
|
35
|
+
|
36
|
+
@field_validator("rating", mode="before")
|
37
|
+
@classmethod
|
38
|
+
def ensure_string(cls, value):
|
39
|
+
return str(value) if value is not None else value
|
40
|
+
|
41
|
+
|
42
|
+
class Episode(BaseModel):
|
43
|
+
season : Optional[int] = None
|
44
|
+
episode : Optional[int] = None
|
45
|
+
title : Optional[str] = None
|
46
|
+
url : Optional[str] = None
|
47
|
+
|
48
|
+
|
49
|
+
class SeriesInfo(BaseModel):
|
50
|
+
url : Optional[str] = None
|
51
|
+
poster : Optional[str] = None
|
52
|
+
title : Optional[str] = None
|
53
|
+
description : Optional[str] = None
|
54
|
+
tags : Optional[str] = None
|
55
|
+
rating : Optional[str] = None
|
56
|
+
year : Optional[str] = None
|
57
|
+
actors : Optional[str] = None
|
58
|
+
episodes : Optional[List[Episode]] = None
|
59
|
+
|
60
|
+
@field_validator("tags", mode="before")
|
61
|
+
@classmethod
|
62
|
+
def convert_tags(cls, value):
|
63
|
+
return ", ".join(value) if isinstance(value, list) else value
|
64
|
+
|
65
|
+
@field_validator("actors", mode="before")
|
66
|
+
@classmethod
|
67
|
+
def convert_actors(cls, value):
|
68
|
+
return ", ".join(value) if isinstance(value, list) else value
|
69
|
+
|
70
|
+
@field_validator("rating", mode="before")
|
71
|
+
@classmethod
|
72
|
+
def ensure_string(cls, value):
|
73
|
+
return str(value) if value is not None else value
|
KekikStream/Core/__init__.py
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
from .PluginBase import PluginBase
|
4
4
|
from .PluginLoader import PluginLoader
|
5
|
-
from .PluginModels import SearchResult, MovieInfo
|
5
|
+
from .PluginModels import SearchResult, MovieInfo, Episode, SeriesInfo
|
6
6
|
from .ExtractorBase import ExtractorBase
|
7
7
|
from .ExtractorLoader import ExtractorLoader
|
8
|
-
from .ExtractorModels import ExtractResult
|
8
|
+
from .ExtractorModels import ExtractResult, Subtitle
|
9
9
|
from .MediaHandler import MediaHandler
|
@@ -0,0 +1,28 @@
|
|
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 PixelDrain(ExtractorBase):
|
7
|
+
name = "PixelDrain"
|
8
|
+
main_url = "https://pixeldrain.com"
|
9
|
+
|
10
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
11
|
+
if referer:
|
12
|
+
self.oturum.headers.update({"Referer": referer})
|
13
|
+
|
14
|
+
pixel_id_match = re.search(r"/u/([^/?]+)|([^\/]+)(?=\?download)", url)
|
15
|
+
if not pixel_id_match:
|
16
|
+
raise ValueError("PixelDrain bağlantısından ID çıkarılamadı.")
|
17
|
+
|
18
|
+
pixel_id = pixel_id_match.group(1)
|
19
|
+
download_link = f"{self.main_url}/api/file/{pixel_id}?download"
|
20
|
+
referer_link = f"{self.main_url}/u/{pixel_id}?download"
|
21
|
+
|
22
|
+
await self.close()
|
23
|
+
return ExtractResult(
|
24
|
+
name = f"{self.name} - {pixel_id}",
|
25
|
+
url = download_link,
|
26
|
+
referer = referer_link,
|
27
|
+
subtitles = []
|
28
|
+
)
|
@@ -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, Subtitle
|
4
|
+
from Kekik.Sifreleme import Packer, HexCodec
|
5
|
+
import re
|
6
|
+
|
7
|
+
class RapidVid(ExtractorBase):
|
8
|
+
name = "RapidVid"
|
9
|
+
main_url = "https://rapidvid.net"
|
10
|
+
|
11
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
12
|
+
if referer:
|
13
|
+
self.oturum.headers.update({"Referer": referer})
|
14
|
+
|
15
|
+
istek = await self.oturum.get(url)
|
16
|
+
istek.raise_for_status()
|
17
|
+
|
18
|
+
subtitles = []
|
19
|
+
subtitle_matches = re.findall(r'captions\",\"file\":\"([^\"]+)\",\"label\":\"([^\"]+)\"', istek.text)
|
20
|
+
seen_subtitles = set()
|
21
|
+
|
22
|
+
for sub_url, sub_lang in subtitle_matches:
|
23
|
+
if sub_url in seen_subtitles:
|
24
|
+
continue
|
25
|
+
seen_subtitles.add(sub_url)
|
26
|
+
|
27
|
+
decoded_lang = (
|
28
|
+
sub_lang.replace("\\u0131", "ı")
|
29
|
+
.replace("\\u0130", "İ")
|
30
|
+
.replace("\\u00fc", "ü")
|
31
|
+
.replace("\\u00e7", "ç")
|
32
|
+
)
|
33
|
+
subtitles.append(Subtitle(name=decoded_lang, url=sub_url.replace("\\", "")))
|
34
|
+
|
35
|
+
try:
|
36
|
+
extracted_value = re.search(r'file": "(.*)",', istek.text)
|
37
|
+
if extracted_value:
|
38
|
+
escaped_hex = extracted_value.group(1)
|
39
|
+
decoded_url = HexCodec.decode(escaped_hex)
|
40
|
+
else:
|
41
|
+
eval_jwsetup = re.search(r'\};\s*(eval\(function[\s\S]*?)var played = \d+;', istek.text)
|
42
|
+
if not eval_jwsetup:
|
43
|
+
raise ValueError("JWPlayer setup not found.")
|
44
|
+
|
45
|
+
unpacked_jwsetup = Packer.unpack(Packer.unpack(eval_jwsetup.group(1)))
|
46
|
+
extracted_value = re.search(r'file":"(.*)","label', unpacked_jwsetup)
|
47
|
+
if not extracted_value:
|
48
|
+
raise ValueError("File URL not found in unpacked JWPlayer setup.")
|
49
|
+
|
50
|
+
escaped_hex = extracted_value.group(1).replace("\\\\x", "")
|
51
|
+
decoded_url = bytes.fromhex(escaped_hex).decode("utf-8")
|
52
|
+
except Exception as e:
|
53
|
+
raise RuntimeError(f"Extraction failed: {e}")
|
54
|
+
|
55
|
+
await self.close()
|
56
|
+
return ExtractResult(
|
57
|
+
name = self.name,
|
58
|
+
url = decoded_url,
|
59
|
+
referer = self.main_url,
|
60
|
+
subtitles = subtitles
|
61
|
+
)
|
@@ -0,0 +1,29 @@
|
|
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 SibNet(ExtractorBase):
|
7
|
+
name = "SibNet"
|
8
|
+
main_url = "https://video.sibnet.ru"
|
9
|
+
|
10
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
11
|
+
if referer:
|
12
|
+
self.oturum.headers.update({"Referer": referer})
|
13
|
+
|
14
|
+
response = await self.oturum.get(url)
|
15
|
+
response.raise_for_status()
|
16
|
+
|
17
|
+
match = re.search(r'player\.src\(\[\{src: \"([^\"]+)\"', response.text)
|
18
|
+
if not match:
|
19
|
+
raise ValueError("m3u bağlantısı bulunamadı.")
|
20
|
+
|
21
|
+
m3u_link = f"{self.main_url}{match.group(1)}"
|
22
|
+
|
23
|
+
await self.close()
|
24
|
+
return ExtractResult(
|
25
|
+
name = self.name,
|
26
|
+
url = m3u_link,
|
27
|
+
referer = url,
|
28
|
+
subtitles = []
|
29
|
+
)
|
@@ -0,0 +1,60 @@
|
|
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
|
+
import json
|
6
|
+
|
7
|
+
class Sobreatsesuyp(ExtractorBase):
|
8
|
+
name = "Sobreatsesuyp"
|
9
|
+
main_url = "https://sobreatsesuyp.com"
|
10
|
+
|
11
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
12
|
+
if referer:
|
13
|
+
self.oturum.headers.update({"Referer": referer})
|
14
|
+
|
15
|
+
istek = await self.oturum.get(url)
|
16
|
+
istek.raise_for_status()
|
17
|
+
|
18
|
+
file_match = re.search(r'file\":\"([^\"]+)', istek.text)
|
19
|
+
if not file_match:
|
20
|
+
raise ValueError("File not found in response.")
|
21
|
+
|
22
|
+
file_path = file_match.group(1).replace("\\", "")
|
23
|
+
post_link = f"{self.main_url}/{file_path}"
|
24
|
+
|
25
|
+
post_istek = await self.oturum.post(post_link)
|
26
|
+
post_istek.raise_for_status()
|
27
|
+
|
28
|
+
try:
|
29
|
+
post_json = json.loads(post_istek.text)
|
30
|
+
except json.JSONDecodeError:
|
31
|
+
raise ValueError("Failed to parse JSON response.")
|
32
|
+
|
33
|
+
video_data_list = post_json[1:] if isinstance(post_json, list) else []
|
34
|
+
|
35
|
+
all_results = []
|
36
|
+
|
37
|
+
for item in video_data_list:
|
38
|
+
title = item.get("title")
|
39
|
+
file = item.get("file")
|
40
|
+
|
41
|
+
if not title or not file:
|
42
|
+
continue
|
43
|
+
|
44
|
+
playlist_url = f"{self.main_url}/playlist/{file.lstrip('/')}.txt"
|
45
|
+
playlist_request = await self.oturum.post(playlist_url, headers={"Referer": referer or self.main_url})
|
46
|
+
playlist_request.raise_for_status()
|
47
|
+
|
48
|
+
all_results.append(
|
49
|
+
ExtractResult(
|
50
|
+
name = f"{self.name} - {title}",
|
51
|
+
url = playlist_request.text,
|
52
|
+
referer = self.main_url,
|
53
|
+
subtitles = []
|
54
|
+
)
|
55
|
+
)
|
56
|
+
|
57
|
+
if not all_results:
|
58
|
+
raise ValueError("No videos found in response.")
|
59
|
+
|
60
|
+
return all_results
|
@@ -0,0 +1,68 @@
|
|
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
|
+
import json
|
6
|
+
|
7
|
+
class TRsTX(ExtractorBase):
|
8
|
+
name = "TRsTX"
|
9
|
+
main_url = "https://trstx.org"
|
10
|
+
|
11
|
+
async def extract(self, url, referer=None) -> list[ExtractResult]:
|
12
|
+
if referer:
|
13
|
+
self.oturum.headers.update({"Referer": referer})
|
14
|
+
|
15
|
+
istek = await self.oturum.get(url)
|
16
|
+
istek.raise_for_status()
|
17
|
+
|
18
|
+
file_match = re.search(r'file\":\"([^\"]+)', istek.text)
|
19
|
+
if not file_match:
|
20
|
+
raise ValueError("File not found in response.")
|
21
|
+
|
22
|
+
file_path = file_match.group(1).replace("\\", "")
|
23
|
+
post_link = f"{self.main_url}/{file_path}"
|
24
|
+
|
25
|
+
post_istek = await self.oturum.post(post_link)
|
26
|
+
post_istek.raise_for_status()
|
27
|
+
|
28
|
+
try:
|
29
|
+
post_json = json.loads(post_istek.text)
|
30
|
+
except json.JSONDecodeError:
|
31
|
+
raise ValueError("Failed to parse JSON response.")
|
32
|
+
|
33
|
+
video_data_list = post_json[1:] if isinstance(post_json, list) else []
|
34
|
+
|
35
|
+
video_links = set()
|
36
|
+
all_results = []
|
37
|
+
|
38
|
+
for item in video_data_list:
|
39
|
+
title = item.get("title")
|
40
|
+
file = item.get("file")
|
41
|
+
|
42
|
+
if not title or not file:
|
43
|
+
continue
|
44
|
+
|
45
|
+
playlist_url = f"{self.main_url}/playlist/{file.lstrip('/')}.txt"
|
46
|
+
playlist_request = await self.oturum.post(playlist_url, headers={"Referer": referer or self.main_url})
|
47
|
+
playlist_request.raise_for_status()
|
48
|
+
|
49
|
+
video_data = playlist_request.text
|
50
|
+
|
51
|
+
if video_data in video_links:
|
52
|
+
continue
|
53
|
+
|
54
|
+
video_links.add(video_data)
|
55
|
+
|
56
|
+
all_results.append(
|
57
|
+
ExtractResult(
|
58
|
+
name = f"{self.name} - {title}",
|
59
|
+
url = video_data,
|
60
|
+
referer = self.main_url,
|
61
|
+
subtitles = []
|
62
|
+
)
|
63
|
+
)
|
64
|
+
|
65
|
+
if not all_results:
|
66
|
+
raise ValueError("No videos found in response.")
|
67
|
+
|
68
|
+
return all_results
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
|
+
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult
|
4
|
+
|
5
|
+
class TauVideo(ExtractorBase):
|
6
|
+
name = "TauVideo"
|
7
|
+
main_url = "https://tau-video.xyz"
|
8
|
+
|
9
|
+
async def extract(self, url, referer=None) -> list[ExtractResult]:
|
10
|
+
if referer:
|
11
|
+
self.oturum.headers.update({"Referer": referer})
|
12
|
+
|
13
|
+
video_key = url.split("/")[-1]
|
14
|
+
api_url = f"{self.main_url}/api/video/{video_key}"
|
15
|
+
|
16
|
+
response = await self.oturum.get(api_url)
|
17
|
+
response.raise_for_status()
|
18
|
+
|
19
|
+
api_data = response.json()
|
20
|
+
|
21
|
+
if "urls" not in api_data:
|
22
|
+
raise ValueError("API yanıtında 'urls' bulunamadı.")
|
23
|
+
|
24
|
+
results = []
|
25
|
+
for video in api_data["urls"]:
|
26
|
+
results.append(ExtractResult(
|
27
|
+
name = f"{self.name} - {video['label']}",
|
28
|
+
url = video["url"],
|
29
|
+
referer = referer or self.main_url,
|
30
|
+
subtitles = []
|
31
|
+
))
|
32
|
+
|
33
|
+
return results
|
@@ -0,0 +1,28 @@
|
|
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 TurboImgz(ExtractorBase):
|
7
|
+
name = "TurboImgz"
|
8
|
+
main_url = "https://turbo.imgz.me"
|
9
|
+
|
10
|
+
async def extract(self, url, referer=None) -> ExtractResult:
|
11
|
+
if referer:
|
12
|
+
self.oturum.headers.update({"Referer": referer})
|
13
|
+
|
14
|
+
istek = await self.oturum.get(url)
|
15
|
+
istek.raise_for_status()
|
16
|
+
|
17
|
+
video_match = re.search(r'file: "(.*)",', istek.text)
|
18
|
+
if not video_match:
|
19
|
+
raise ValueError("File not found in response.")
|
20
|
+
|
21
|
+
video_link = video_match.group(1)
|
22
|
+
|
23
|
+
return ExtractResult(
|
24
|
+
name = self.name,
|
25
|
+
url = video_link,
|
26
|
+
referer = referer or self.main_url,
|
27
|
+
subtitles = []
|
28
|
+
)
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
|
+
# ! https://github.com/recloudstream/cloudstream/blob/master/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Vidmoly.kt
|
3
|
+
|
4
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle
|
5
|
+
import re
|
6
|
+
import asyncio
|
7
|
+
import json
|
8
|
+
|
9
|
+
class VidMoly(ExtractorBase):
|
10
|
+
name = "VidMoly"
|
11
|
+
main_url = "https://vidmoly.to"
|
12
|
+
|
13
|
+
async def extract(self, url: str, referer: str = None) -> ExtractResult:
|
14
|
+
if referer:
|
15
|
+
self.oturum.headers.update({"Referer": referer})
|
16
|
+
|
17
|
+
headers = {
|
18
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
|
19
|
+
"Sec-Fetch-Dest": "iframe",
|
20
|
+
}
|
21
|
+
|
22
|
+
# Embed URL oluştur
|
23
|
+
embed_url = (
|
24
|
+
url.replace("/w/", "/embed-") + "-920x360.html" if "/w/" in url else url
|
25
|
+
)
|
26
|
+
script_content = None
|
27
|
+
attempts = 0
|
28
|
+
|
29
|
+
# Script verisini almak için deneme yap
|
30
|
+
while attempts < 10 and not script_content:
|
31
|
+
attempts += 1
|
32
|
+
response = await self.oturum.get(embed_url, headers=headers)
|
33
|
+
response.raise_for_status()
|
34
|
+
script_match = re.search(r"sources:\s*\[(.*?)\],", response.text, re.DOTALL)
|
35
|
+
script_content = script_match.group(1) if script_match else None
|
36
|
+
if not script_content:
|
37
|
+
await asyncio.sleep(0.5)
|
38
|
+
|
39
|
+
if not script_content:
|
40
|
+
raise ValueError("Gerekli script bulunamadı.")
|
41
|
+
|
42
|
+
# Video kaynaklarını ayrıştır
|
43
|
+
video_data = self._add_marks(script_content, "file")
|
44
|
+
try:
|
45
|
+
video_sources = json.loads(f"[{video_data}]")
|
46
|
+
except json.JSONDecodeError:
|
47
|
+
raise ValueError("Video kaynakları ayrıştırılamadı.")
|
48
|
+
|
49
|
+
# Altyazı kaynaklarını ayrıştır
|
50
|
+
subtitles = []
|
51
|
+
subtitle_match = re.search(r"tracks:\s*\[(.*?)\]", response.text, re.DOTALL)
|
52
|
+
if subtitle_match:
|
53
|
+
subtitle_data = self._add_marks(subtitle_match.group(1), "file")
|
54
|
+
subtitle_data = self._add_marks(subtitle_data, "label")
|
55
|
+
subtitle_data = self._add_marks(subtitle_data, "kind")
|
56
|
+
|
57
|
+
try:
|
58
|
+
subtitle_sources = json.loads(f"[{subtitle_data}]")
|
59
|
+
subtitles = [
|
60
|
+
Subtitle(
|
61
|
+
name=sub.get("label"),
|
62
|
+
url=self.fix_url(sub.get("file")),
|
63
|
+
)
|
64
|
+
for sub in subtitle_sources
|
65
|
+
if sub.get("kind") == "captions"
|
66
|
+
]
|
67
|
+
except json.JSONDecodeError:
|
68
|
+
pass
|
69
|
+
|
70
|
+
# İlk video kaynağını al
|
71
|
+
video_url = None
|
72
|
+
for source in video_sources:
|
73
|
+
file_url = source.get("file")
|
74
|
+
if file_url:
|
75
|
+
video_url = file_url
|
76
|
+
break
|
77
|
+
|
78
|
+
if not video_url:
|
79
|
+
raise ValueError("Video URL bulunamadı.")
|
80
|
+
|
81
|
+
await self.close()
|
82
|
+
return ExtractResult(
|
83
|
+
name=self.name,
|
84
|
+
url=video_url,
|
85
|
+
referer=self.main_url,
|
86
|
+
subtitles=subtitles,
|
87
|
+
)
|
88
|
+
|
89
|
+
def _add_marks(self, text: str, field: str) -> str:
|
90
|
+
"""
|
91
|
+
Verilen alanı çift tırnak içine alır.
|
92
|
+
"""
|
93
|
+
return re.sub(rf"\"?{field}\"?", f"\"{field}\"", text)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
2
2
|
|
3
|
-
from KekikStream.Core import ExtractorBase, ExtractResult
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle
|
4
4
|
from Kekik.Sifreleme import Packer, HexCodec
|
5
5
|
import re
|
6
6
|
|
@@ -15,6 +15,23 @@ class VidMoxy(ExtractorBase):
|
|
15
15
|
istek = await self.oturum.get(url)
|
16
16
|
istek.raise_for_status()
|
17
17
|
|
18
|
+
subtitles = []
|
19
|
+
subtitle_matches = re.findall(r'captions","file":"([^"]+)","label":"([^"]+)"', istek.text)
|
20
|
+
seen_subtitles = set()
|
21
|
+
|
22
|
+
for sub_url, sub_lang in subtitle_matches:
|
23
|
+
if sub_url in seen_subtitles:
|
24
|
+
continue
|
25
|
+
seen_subtitles.add(sub_url)
|
26
|
+
|
27
|
+
decoded_lang = (
|
28
|
+
sub_lang.replace("\\u0131", "ı")
|
29
|
+
.replace("\\u0130", "İ")
|
30
|
+
.replace("\\u00fc", "ü")
|
31
|
+
.replace("\\u00e7", "ç")
|
32
|
+
)
|
33
|
+
subtitles.append(Subtitle(name=decoded_lang, url=sub_url.replace("\\", "")))
|
34
|
+
|
18
35
|
try:
|
19
36
|
escaped_hex = re.findall(r'file": "(.*)",', istek.text)[0]
|
20
37
|
except Exception:
|
@@ -29,5 +46,5 @@ class VidMoxy(ExtractorBase):
|
|
29
46
|
name = self.name,
|
30
47
|
url = m3u_link,
|
31
48
|
referer = self.main_url,
|
32
|
-
subtitles =
|
49
|
+
subtitles = subtitles
|
33
50
|
)
|