KekikStream 0.0.6__tar.gz → 0.1.7__tar.gz

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.
Files changed (47) hide show
  1. kekikstream-0.1.7/KekikStream/CLI/__init__.py +4 -0
  2. kekikstream-0.1.7/KekikStream/CLI/check_update.py +33 -0
  3. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Core/ExtractorBase.py +1 -1
  4. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Core/MediaHandler.py +7 -1
  5. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Core/PluginBase.py +4 -1
  6. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Core/PluginLoader.py +1 -1
  7. kekikstream-0.1.7/KekikStream/Core/PluginModels.py +68 -0
  8. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Core/__init__.py +2 -2
  9. kekikstream-0.1.7/KekikStream/Extractors/PixelDrain.py +28 -0
  10. kekikstream-0.1.7/KekikStream/Extractors/RapidVid.py +61 -0
  11. kekikstream-0.1.7/KekikStream/Extractors/SibNet.py +29 -0
  12. kekikstream-0.1.7/KekikStream/Extractors/Sobreatsesuyp.py +60 -0
  13. kekikstream-0.1.7/KekikStream/Extractors/TRsTX.py +68 -0
  14. kekikstream-0.1.7/KekikStream/Extractors/TauVideo.py +33 -0
  15. kekikstream-0.1.7/KekikStream/Extractors/TurboImgz.py +28 -0
  16. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Extractors/VidMoxy.py +19 -3
  17. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Managers/ExtractorManager.py +1 -1
  18. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Managers/PluginManager.py +4 -3
  19. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Managers/UIManager.py +14 -1
  20. kekikstream-0.1.7/KekikStream/Plugins/SineWix.py +105 -0
  21. kekikstream-0.1.7/KekikStream/__init__.py +236 -0
  22. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream.egg-info/PKG-INFO +6 -2
  23. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream.egg-info/SOURCES.txt +9 -0
  24. {kekikstream-0.0.6 → kekikstream-0.1.7}/PKG-INFO +6 -2
  25. {kekikstream-0.0.6 → kekikstream-0.1.7}/README.md +4 -0
  26. {kekikstream-0.0.6 → kekikstream-0.1.7}/setup.py +2 -2
  27. kekikstream-0.0.6/KekikStream/CLI/__init__.py +0 -3
  28. kekikstream-0.0.6/KekikStream/Core/PluginModels.py +0 -32
  29. kekikstream-0.0.6/KekikStream/__init__.py +0 -124
  30. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Core/ExtractorLoader.py +0 -0
  31. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Core/ExtractorModels.py +0 -0
  32. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Extractors/CloseLoad.py +0 -0
  33. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Extractors/MailRu.py +0 -0
  34. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Managers/MediaManager.py +0 -0
  35. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Managers/__init__.py +0 -0
  36. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Plugins/FilmMakinesi.py +0 -0
  37. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Plugins/FullHDFilmizlesene.py +0 -0
  38. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/Plugins/UgurFilm.py +0 -0
  39. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/__main__.py +0 -0
  40. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream/requirements.txt +0 -0
  41. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream.egg-info/dependency_links.txt +0 -0
  42. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream.egg-info/entry_points.txt +0 -0
  43. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream.egg-info/requires.txt +0 -0
  44. {kekikstream-0.0.6 → kekikstream-0.1.7}/KekikStream.egg-info/top_level.txt +0 -0
  45. {kekikstream-0.0.6 → kekikstream-0.1.7}/LICENSE +0 -0
  46. {kekikstream-0.0.6 → kekikstream-0.1.7}/MANIFEST.in +0 -0
  47. {kekikstream-0.0.6 → kekikstream-0.1.7}/setup.cfg +0 -0
@@ -0,0 +1,4 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
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]")
@@ -12,7 +12,7 @@ class ExtractorBase(ABC):
12
12
  def __init__(self):
13
13
  self.oturum = AsyncClient(
14
14
  headers = {
15
- "User-Agent" : "keyiflerolsun/KekikStream",
15
+ "User-Agent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5)",
16
16
  "Accept" : "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
17
17
  },
18
18
  timeout = Timeout(10.0),
@@ -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:
@@ -3,19 +3,22 @@
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
6
7
 
7
8
  class PluginBase(ABC):
8
9
  name = "Plugin"
9
10
  main_url = "https://example.com"
11
+ _data = {}
10
12
 
11
13
  def __init__(self):
12
14
  self.oturum = AsyncClient(
13
15
  headers = {
14
- "User-Agent" : "keyiflerolsun/KekikStream",
16
+ "User-Agent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5)",
15
17
  "Accept" : "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
16
18
  },
17
19
  timeout = Timeout(10.0),
18
20
  )
21
+ self.media_handler = MediaHandler()
19
22
 
20
23
  @abstractmethod
21
24
  async def search(self, query: str) -> list[SearchResult]:
@@ -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 = {}
@@ -0,0 +1,68 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
3
+ from pydantic import BaseModel, field_validator
4
+ from typing import List, Optional
5
+
6
+
7
+ class SearchResult(BaseModel):
8
+ """Arama sonucunda dönecek veri modeli."""
9
+ title : str
10
+ url : str
11
+ poster : Optional[str] = None
12
+
13
+
14
+ class MovieInfo(BaseModel):
15
+ """Bir medya öğesinin bilgilerini tutan model."""
16
+ url : str
17
+ poster : Optional[str] = None
18
+ title : Optional[str] = None
19
+ description : Optional[str] = None
20
+ tags : Optional[str] = None
21
+ rating : Optional[str] = None
22
+ year : Optional[str] = None
23
+ actors : Optional[str] = None
24
+ duration : Optional[int] = None
25
+
26
+ @field_validator("tags", mode="before")
27
+ @classmethod
28
+ def convert_tags(cls, value):
29
+ return ", ".join(value) if isinstance(value, list) else value
30
+
31
+ @field_validator("actors", mode="before")
32
+ @classmethod
33
+ def convert_actors(cls, 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[float] = 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
@@ -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"([^\/]+)(?=\?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
+ )
@@ -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
 
@@ -9,13 +9,29 @@ class VidMoxy(ExtractorBase):
9
9
  main_url = "https://vidmoxy.com"
10
10
 
11
11
  async def extract(self, url, referer=None) -> ExtractResult:
12
- self.oturum.headers.update({"User-Agent":"Mozilla/5.0"})
13
12
  if referer:
14
13
  self.oturum.headers.update({"Referer": referer})
15
14
 
16
15
  istek = await self.oturum.get(url)
17
16
  istek.raise_for_status()
18
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
+
19
35
  try:
20
36
  escaped_hex = re.findall(r'file": "(.*)",', istek.text)[0]
21
37
  except Exception:
@@ -30,5 +46,5 @@ class VidMoxy(ExtractorBase):
30
46
  name = self.name,
31
47
  url = m3u_link,
32
48
  referer = self.main_url,
33
- subtitles = []
49
+ subtitles = subtitles
34
50
  )
@@ -21,7 +21,7 @@ class ExtractorManager:
21
21
  for extractor_cls in self.extractors:
22
22
  extractor:ExtractorBase = extractor_cls()
23
23
  if extractor.can_handle_url(link):
24
- mapping[link] = extractor.name
24
+ mapping[link] = f"{extractor.name:<30} » {link.replace(extractor.main_url, '')}"
25
25
  break
26
26
 
27
27
  return mapping
@@ -1,6 +1,6 @@
1
1
  # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
2
 
3
- from ..Core import PluginLoader
3
+ from ..Core import PluginLoader, PluginBase
4
4
 
5
5
  class PluginManager:
6
6
  def __init__(self, plugin_dir="Plugins"):
@@ -8,11 +8,12 @@ class PluginManager:
8
8
  self.plugins = self.plugin_loader.load_all()
9
9
 
10
10
  def get_plugin_names(self):
11
- return list(self.plugins.keys())
11
+ return sorted(list(self.plugins.keys()))
12
12
 
13
13
  def select_plugin(self, plugin_name):
14
14
  return self.plugins.get(plugin_name)
15
15
 
16
16
  async def close_plugins(self):
17
17
  for plugin in self.plugins.values():
18
- await plugin.close()
18
+ if isinstance(plugin, PluginBase):
19
+ await plugin.close()
@@ -13,7 +13,17 @@ class UIManager:
13
13
 
14
14
  @staticmethod
15
15
  async def select_from_list(message, choices):
16
- return await inquirer.select(message=message, choices=choices).execute_async()
16
+ return await inquirer.select(message=message, choices=choices, max_height="75%").execute_async()
17
+
18
+ @staticmethod
19
+ async def select_from_fuzzy(message, choices):
20
+ return await inquirer.fuzzy(
21
+ message = message,
22
+ choices = choices,
23
+ validate = lambda result: result in [choice if isinstance(choice, str) else choice["value"] for choice in choices],
24
+ filter = lambda result: result,
25
+ max_height = "75%"
26
+ ).execute_async()
17
27
 
18
28
  @staticmethod
19
29
  async def prompt_text(message):
@@ -26,6 +36,9 @@ class UIManager:
26
36
  table.add_column(style="magenta")
27
37
 
28
38
  for key, value in media_info.dict().items():
39
+ if key == "episodes":
40
+ continue
41
+
29
42
  if value:
30
43
  table.add_row(f"[bold cyan]{key.capitalize()}[/bold cyan]", str(value))
31
44