KekikStream 2.4.8__tar.gz → 2.5.4__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.
Potentially problematic release.
This version of KekikStream might be problematic. Click here for more details.
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Extractor/ExtractorLoader.py +8 -14
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Plugin/PluginBase.py +15 -4
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Plugin/PluginLoader.py +12 -14
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Plugin/PluginManager.py +2 -2
- kekikstream-2.5.4/KekikStream/Extractors/Abstream.py +27 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/Filemoon.py +2 -1
- kekikstream-2.5.4/KekikStream/Extractors/JetV.py +55 -0
- kekikstream-2.5.4/KekikStream/Extractors/Veev.py +145 -0
- kekikstream-2.5.4/KekikStream/Extractors/VidBiz.py +62 -0
- kekikstream-2.5.4/KekikStream/Extractors/VidHide.py +105 -0
- kekikstream-2.5.4/KekikStream/Extractors/Vtbe.py +38 -0
- kekikstream-2.5.4/KekikStream/Extractors/Zeus.py +61 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/FilmEkseni.py +53 -16
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/FilmMakinesi.py +1 -1
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/FilmciBaba.py +1 -1
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/HDFilmCehennemi.py +37 -14
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/JetFilmizle.py +82 -49
- kekikstream-2.5.4/KekikStream/Plugins/KultFilmler.py +257 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/RecTV.py +9 -5
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/RoketDizi.py +13 -22
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/SetFilmIzle.py +47 -19
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/SezonlukDizi.py +62 -34
- kekikstream-2.5.4/KekikStream/Plugins/Sinefy.py +298 -0
- kekikstream-2.5.4/KekikStream/Plugins/SinemaCX.py +245 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/Sinezy.py +15 -16
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/SuperFilmGeldi.py +3 -3
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/UgurFilm.py +71 -24
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/Watch32.py +38 -53
- kekikstream-2.5.4/KekikStream/Plugins/YabanciDizi.py +250 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream.egg-info/PKG-INFO +3 -3
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream.egg-info/SOURCES.txt +6 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/PKG-INFO +3 -3
- {kekikstream-2.4.8 → kekikstream-2.5.4}/README.md +2 -2
- {kekikstream-2.4.8 → kekikstream-2.5.4}/setup.py +1 -1
- kekikstream-2.4.8/KekikStream/Extractors/VidHide.py +0 -56
- kekikstream-2.4.8/KekikStream/Plugins/KultFilmler.py +0 -189
- kekikstream-2.4.8/KekikStream/Plugins/Sinefy.py +0 -207
- kekikstream-2.4.8/KekikStream/Plugins/SinemaCX.py +0 -169
- kekikstream-2.4.8/KekikStream/Plugins/YabanciDizi.py +0 -231
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/CLI/__init__.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/CLI/pypi_kontrol.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Extractor/ExtractorBase.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Extractor/ExtractorManager.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Extractor/ExtractorModels.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Extractor/YTDLPCache.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/HTMLHelper.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Media/MediaHandler.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Media/MediaManager.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/Plugin/PluginModels.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/UI/UIManager.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Core/__init__.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/CloseLoad.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/ContentX.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/DonilasPlay.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/DzenRu.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/ExPlay.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/HDMomPlayer.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/HDPlayerSystem.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/HotStream.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/JFVid.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/JetTv.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/MailRu.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/MixPlayHD.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/MixTiger.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/MolyStream.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/Odnoklassniki.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/PeaceMakerst.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/PixelDrain.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/PlayerFilmIzle.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/RapidVid.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/SetPlay.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/SetPrime.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/SibNet.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/Sobreatsesuyp.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/TRsTX.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/TauVideo.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/TurboImgz.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/TurkeyPlayer.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/VCTPlay.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/VidMoly.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/VidMoxy.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/VidPapi.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/VideoSeyred.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/Videostr.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/Vidoza.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/YTDLP.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Extractors/YildizKisaFilm.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/BelgeselX.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/DiziBox.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/DiziMom.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/DiziPal.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/DiziYou.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/Dizilla.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/FilmBip.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/FilmModu.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/Filmatek.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/FullHDFilmizlesene.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/HDFilm.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/SelcukFlix.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/Plugins/SineWix.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/__init__.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/__main__.py +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream/requirements.txt +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream.egg-info/dependency_links.txt +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream.egg-info/entry_points.txt +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream.egg-info/requires.txt +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/KekikStream.egg-info/top_level.txt +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/LICENSE +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/MANIFEST.in +0 -0
- {kekikstream-2.4.8 → kekikstream-2.5.4}/setup.cfg +0 -0
|
@@ -9,7 +9,7 @@ class ExtractorLoader:
|
|
|
9
9
|
def __init__(self, extractors_dir: str):
|
|
10
10
|
# Yerel ve global çıkarıcı dizinlerini ayarla
|
|
11
11
|
self.local_extractors_dir = Path(extractors_dir)
|
|
12
|
-
self.global_extractors_dir = Path(__file__).parent.parent.parent /
|
|
12
|
+
self.global_extractors_dir = Path(__file__).parent.parent.parent / "Extractors"
|
|
13
13
|
|
|
14
14
|
# Dizin kontrolü
|
|
15
15
|
if not self.local_extractors_dir.exists() and not self.global_extractors_dir.exists():
|
|
@@ -19,22 +19,16 @@ class ExtractorLoader:
|
|
|
19
19
|
def load_all(self) -> list[ExtractorBase]:
|
|
20
20
|
extractors = []
|
|
21
21
|
|
|
22
|
-
#
|
|
23
|
-
|
|
22
|
+
# Yerel Extractor'lar varsa önce onları yükle (ek/öncelikli yetenekler)
|
|
23
|
+
# Eğer yerel dizin global dizinle aynıysa (örn: doğrudan core'da çalışırken) tekrar yükleme yapma
|
|
24
|
+
if self.local_extractors_dir.exists() and self.local_extractors_dir.resolve() != self.global_extractors_dir.resolve():
|
|
24
25
|
# konsol.log(f"[green][*] Yerel Extractor dizininden yükleniyor: {self.local_extractors_dir}[/green]")
|
|
25
|
-
|
|
26
|
-
# konsol.log(f"[green]Yerel Extractor'lar: {[e.__name__ for e in local_extractors]}[/green]")
|
|
26
|
+
extractors.extend(self._load_from_directory(self.local_extractors_dir))
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
extractors.extend(local_extractors)
|
|
31
|
-
|
|
32
|
-
# Yerel dizinde Extractor yoksa, global'leri yükle
|
|
33
|
-
if not extractors and self.global_extractors_dir.exists():
|
|
28
|
+
# Global Extractor'ları her zaman yükle (temel yetenekler)
|
|
29
|
+
if self.global_extractors_dir.exists():
|
|
34
30
|
# konsol.log(f"[green][*] Global Extractor dizininden yükleniyor: {self.global_extractors_dir}[/green]")
|
|
35
|
-
|
|
36
|
-
# konsol.log(f"[green]Global Extractor'lar: {[e.__name__ for e in global_extractors]}[/green]")
|
|
37
|
-
extractors.extend(global_extractors)
|
|
31
|
+
extractors.extend(self._load_from_directory(self.global_extractors_dir))
|
|
38
32
|
|
|
39
33
|
# Benzersizliği sağlama (modül adı + sınıf adı bazında)
|
|
40
34
|
unique_extractors = []
|
|
@@ -25,7 +25,7 @@ class PluginBase(ABC):
|
|
|
25
25
|
self.main_page = {url.replace(self.main_url, new_url): category for url, category in self.main_page.items()}
|
|
26
26
|
self.main_url = new_url
|
|
27
27
|
|
|
28
|
-
def __init__(self, proxy: str | dict | None = None):
|
|
28
|
+
def __init__(self, proxy: str | dict | None = None, ex_manager: str | ExtractorManager = "Extractors"):
|
|
29
29
|
# cloudscraper - for bypassing Cloudflare
|
|
30
30
|
self.cloudscraper = CloudScraper()
|
|
31
31
|
if proxy:
|
|
@@ -50,7 +50,12 @@ class PluginBase(ABC):
|
|
|
50
50
|
})
|
|
51
51
|
|
|
52
52
|
self.media_handler = MediaHandler()
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
# If an instance is passed, use it; otherwise create a new one
|
|
55
|
+
if isinstance(ex_manager, ExtractorManager):
|
|
56
|
+
self.ex_manager = ex_manager
|
|
57
|
+
else:
|
|
58
|
+
self.ex_manager = ExtractorManager(extractor_dir=ex_manager)
|
|
54
59
|
|
|
55
60
|
@abstractmethod
|
|
56
61
|
async def get_main_page(self, page: int, url: str, category: str) -> list[MainPageResult]:
|
|
@@ -144,14 +149,20 @@ class PluginBase(ABC):
|
|
|
144
149
|
if name_override:
|
|
145
150
|
item.name = name_override
|
|
146
151
|
elif prefix and item.name:
|
|
147
|
-
item.name
|
|
152
|
+
if item.name.lower() in prefix.lower():
|
|
153
|
+
item.name = prefix
|
|
154
|
+
else:
|
|
155
|
+
item.name = f"{prefix} | {item.name}"
|
|
148
156
|
return data
|
|
149
157
|
|
|
150
158
|
# Tekil öğe ise
|
|
151
159
|
if name_override:
|
|
152
160
|
data.name = name_override
|
|
153
161
|
elif prefix and data.name:
|
|
154
|
-
data.name
|
|
162
|
+
if data.name.lower() in prefix.lower():
|
|
163
|
+
data.name = prefix
|
|
164
|
+
else:
|
|
165
|
+
data.name = f"{prefix} | {data.name}"
|
|
155
166
|
|
|
156
167
|
return data
|
|
157
168
|
except Exception as hata:
|
|
@@ -6,11 +6,12 @@ from pathlib import Path
|
|
|
6
6
|
import os, importlib.util, traceback
|
|
7
7
|
|
|
8
8
|
class PluginLoader:
|
|
9
|
-
def __init__(self, plugins_dir: str, proxy: str | dict | None = None):
|
|
9
|
+
def __init__(self, plugins_dir: str, proxy: str | dict | None = None, ex_manager: str | ExtractorManager = "Extractors"):
|
|
10
10
|
# Yerel ve global eklenti dizinlerini ayarla
|
|
11
11
|
self.proxy = proxy
|
|
12
|
+
self.ex_manager = ex_manager
|
|
12
13
|
self.local_plugins_dir = Path(plugins_dir).resolve()
|
|
13
|
-
self.global_plugins_dir = Path(__file__).parent.parent.parent /
|
|
14
|
+
self.global_plugins_dir = Path(__file__).parent.parent.parent / "Plugins"
|
|
14
15
|
|
|
15
16
|
# Dizin kontrolü
|
|
16
17
|
if not self.local_plugins_dir.exists() and not self.global_plugins_dir.exists():
|
|
@@ -18,19 +19,16 @@ class PluginLoader:
|
|
|
18
19
|
cikis_yap(False)
|
|
19
20
|
|
|
20
21
|
def load_all(self) -> dict[str, PluginBase]:
|
|
21
|
-
plugins
|
|
22
|
+
plugins = {}
|
|
23
|
+
local_dir_exists = self.local_plugins_dir.exists() and self.local_plugins_dir.resolve() != self.global_plugins_dir.resolve()
|
|
22
24
|
|
|
23
|
-
# Eğer yerel
|
|
24
|
-
if
|
|
25
|
+
# Eğer yerel dizin varsa, sadece oradan yükle (eklenti geliştirme/yayınlama modu)
|
|
26
|
+
if local_dir_exists:
|
|
25
27
|
# konsol.log(f"[green][*] Yerel Eklenti dizininden yükleniyor: {self.local_plugins_dir}[/green]")
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
plugins |= local_plugins
|
|
31
|
-
|
|
32
|
-
# Yerel dizinde Plugin yoksa, global'leri yükle
|
|
33
|
-
if not plugins and self.global_plugins_dir.exists():
|
|
28
|
+
plugins |= self._load_from_directory(self.local_plugins_dir)
|
|
29
|
+
|
|
30
|
+
# Yerel dizin yoksa (veya core ile aynı yerse), global'leri yükle
|
|
31
|
+
else:
|
|
34
32
|
# konsol.log(f"[green][*] Global Eklenti dizininden yükleniyor: {self.global_plugins_dir}[/green]")
|
|
35
33
|
plugins |= self._load_from_directory(self.global_plugins_dir)
|
|
36
34
|
|
|
@@ -71,7 +69,7 @@ class PluginLoader:
|
|
|
71
69
|
obj = getattr(module, attr)
|
|
72
70
|
if isinstance(obj, type) and issubclass(obj, PluginBase) and obj is not PluginBase:
|
|
73
71
|
# konsol.log(f"[yellow]Yüklenen sınıf\t\t: {module_name}.{obj.__name__} ({obj.__module__}.{obj.__name__})[/yellow]")
|
|
74
|
-
return obj(proxy=self.proxy)
|
|
72
|
+
return obj(proxy=self.proxy, ex_manager=self.ex_manager)
|
|
75
73
|
|
|
76
74
|
except Exception as hata:
|
|
77
75
|
konsol.print(f"[red][!] Eklenti yüklenirken hata oluştu: {module_name}\nHata: {hata}")
|
|
@@ -4,9 +4,9 @@ from .PluginLoader import PluginLoader
|
|
|
4
4
|
from .PluginBase import PluginBase
|
|
5
5
|
|
|
6
6
|
class PluginManager:
|
|
7
|
-
def __init__(self, plugin_dir="Plugins", proxy: str | dict | None = None):
|
|
7
|
+
def __init__(self, plugin_dir="Plugins", proxy: str | dict | None = None, ex_manager: str | ExtractorManager = "Extractors"):
|
|
8
8
|
# Eklenti yükleyiciyi başlat ve tüm eklentileri yükle
|
|
9
|
-
self.plugin_loader = PluginLoader(plugin_dir, proxy=proxy)
|
|
9
|
+
self.plugin_loader = PluginLoader(plugin_dir, proxy=proxy, ex_manager=ex_manager)
|
|
10
10
|
self.plugins = self.plugin_loader.load_all()
|
|
11
11
|
|
|
12
12
|
def get_plugin_names(self):
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, HTMLHelper
|
|
4
|
+
|
|
5
|
+
class Abstream(ExtractorBase):
|
|
6
|
+
name = "Abstream"
|
|
7
|
+
main_url = "https://abstream.to"
|
|
8
|
+
|
|
9
|
+
async def extract(self, url: str, referer: str = None) -> ExtractResult:
|
|
10
|
+
istek = await self.httpx.get(
|
|
11
|
+
url = url,
|
|
12
|
+
headers = {
|
|
13
|
+
"Accept-Language" : "en-US,en;q=0.5",
|
|
14
|
+
"Referer" : referer or self.main_url,
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
secici = HTMLHelper(istek.text)
|
|
18
|
+
video_url = secici.regex_first(r'file:"([^"]*)"')
|
|
19
|
+
|
|
20
|
+
if not video_url:
|
|
21
|
+
raise ValueError(f"Abstream: Video URL bulunamadı. {url}")
|
|
22
|
+
|
|
23
|
+
return ExtractResult(
|
|
24
|
+
name = self.name,
|
|
25
|
+
url = video_url,
|
|
26
|
+
referer = referer or self.main_url
|
|
27
|
+
)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, HTMLHelper
|
|
4
|
+
import json, re
|
|
5
|
+
|
|
6
|
+
class JetV(ExtractorBase):
|
|
7
|
+
name = "JetV"
|
|
8
|
+
main_url = "https://jetv.xyz"
|
|
9
|
+
|
|
10
|
+
async def extract(self, url: str, referer: str = None) -> list[ExtractResult]:
|
|
11
|
+
istek = await self.httpx.get(url, headers={"Referer": referer} if referer else None)
|
|
12
|
+
text = istek.text
|
|
13
|
+
|
|
14
|
+
# Script içindeki sources kısmını bul
|
|
15
|
+
# "sources": [ ... ]
|
|
16
|
+
sources_str = HTMLHelper(text).regex_first(r'"sources":\s*(\[.*?\])')
|
|
17
|
+
if not sources_str:
|
|
18
|
+
# Altenatif: sources: [ ... ] (tırnaksız sources)
|
|
19
|
+
sources_str = HTMLHelper(text).regex_first(r'sources:\s*(\[.*?\])')
|
|
20
|
+
|
|
21
|
+
if not sources_str:
|
|
22
|
+
raise ValueError(f"JetV: Sources bulunamadı. {url}")
|
|
23
|
+
|
|
24
|
+
# file: -> "file":
|
|
25
|
+
clean_json = re.sub(r'(\w+):', r'"\1":', sources_str)
|
|
26
|
+
# ' -> "
|
|
27
|
+
clean_json = clean_json.replace("'", '"')
|
|
28
|
+
|
|
29
|
+
try:
|
|
30
|
+
sources = json.loads(clean_json)
|
|
31
|
+
except:
|
|
32
|
+
# Basit parser yetmediyse, manuel parse deneyelim (tek kaynak varsa)
|
|
33
|
+
file_url = HTMLHelper(sources_str).regex_first(r'file["\']?:\s*["\']([^"\']+)["\']')
|
|
34
|
+
label = HTMLHelper(sources_str).regex_first(r'label["\']?:\s*["\']([^"\']+)["\']')
|
|
35
|
+
if file_url:
|
|
36
|
+
sources = [{"file": file_url, "label": label or "Unknown"}]
|
|
37
|
+
else:
|
|
38
|
+
raise ValueError("JetV: JSON parse hatası")
|
|
39
|
+
|
|
40
|
+
results = []
|
|
41
|
+
for source in sources:
|
|
42
|
+
file_path = source.get("file")
|
|
43
|
+
label = source.get("label", "Unknown")
|
|
44
|
+
|
|
45
|
+
if not file_path:
|
|
46
|
+
continue
|
|
47
|
+
|
|
48
|
+
results.append(ExtractResult(
|
|
49
|
+
name = f"{self.name} | {label}",
|
|
50
|
+
url = self.fix_url(file_path),
|
|
51
|
+
referer = url,
|
|
52
|
+
user_agent = self.httpx.headers.get("User-Agent", "")
|
|
53
|
+
))
|
|
54
|
+
|
|
55
|
+
return results
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, HTMLHelper
|
|
4
|
+
from contextlib import suppress
|
|
5
|
+
|
|
6
|
+
class Veev(ExtractorBase):
|
|
7
|
+
name = "Veev"
|
|
8
|
+
main_url = "https://veev.to"
|
|
9
|
+
|
|
10
|
+
supported_domains = ["veev.to", "kinoger.to", "poophq.com", "doods.pro", "dood.so", "dood.li", "dood.wf", "dood.cx", "dood.sh", "dood.watch", "dood.pm", "dood.to", "dood.ws"]
|
|
11
|
+
|
|
12
|
+
def can_handle_url(self, url: str) -> bool:
|
|
13
|
+
return any(domain in url for domain in self.supported_domains)
|
|
14
|
+
|
|
15
|
+
def veev_decode(self, encoded: str) -> str:
|
|
16
|
+
if not encoded:
|
|
17
|
+
return ""
|
|
18
|
+
|
|
19
|
+
result = []
|
|
20
|
+
# Python dictionary key integer, value string
|
|
21
|
+
# Başlangıçta 0-255 ascii karakterleri
|
|
22
|
+
lut = {i: chr(i) for i in range(256)}
|
|
23
|
+
n = 256
|
|
24
|
+
|
|
25
|
+
c = encoded[0]
|
|
26
|
+
result.append(c)
|
|
27
|
+
|
|
28
|
+
for char in encoded[1:]:
|
|
29
|
+
code = ord(char)
|
|
30
|
+
if code < 256:
|
|
31
|
+
nc = char
|
|
32
|
+
else:
|
|
33
|
+
nc = lut.get(code, c + c[0])
|
|
34
|
+
|
|
35
|
+
result.append(nc)
|
|
36
|
+
lut[n] = c + nc[0]
|
|
37
|
+
n += 1
|
|
38
|
+
c = nc
|
|
39
|
+
|
|
40
|
+
return "".join(result)
|
|
41
|
+
|
|
42
|
+
def build_array(self, encoded: str) -> list[list[int]]:
|
|
43
|
+
result = []
|
|
44
|
+
iterator = iter(encoded)
|
|
45
|
+
|
|
46
|
+
def next_int_or_zero():
|
|
47
|
+
try:
|
|
48
|
+
char = next(iterator)
|
|
49
|
+
if char.isdigit():
|
|
50
|
+
return int(char)
|
|
51
|
+
return 0
|
|
52
|
+
except StopIteration:
|
|
53
|
+
return 0
|
|
54
|
+
|
|
55
|
+
count = next_int_or_zero()
|
|
56
|
+
while count != 0:
|
|
57
|
+
row = []
|
|
58
|
+
for _ in range(count):
|
|
59
|
+
row.append(next_int_or_zero())
|
|
60
|
+
result.append(list(reversed(row)))
|
|
61
|
+
count = next_int_or_zero()
|
|
62
|
+
|
|
63
|
+
return result
|
|
64
|
+
|
|
65
|
+
def decode_url(self, encoded: str, rules: list[int]) -> str:
|
|
66
|
+
text = encoded
|
|
67
|
+
for r in rules:
|
|
68
|
+
if r == 1:
|
|
69
|
+
text = text[::-1]
|
|
70
|
+
|
|
71
|
+
# Hex decode
|
|
72
|
+
with suppress(Exception):
|
|
73
|
+
# remove optional whitespace just in case
|
|
74
|
+
clean_hex = "".join(text.split())
|
|
75
|
+
arr = bytes.fromhex(clean_hex)
|
|
76
|
+
# utf-8 decode, replace errors
|
|
77
|
+
text = arr.decode('utf-8', errors='replace')
|
|
78
|
+
|
|
79
|
+
text = text.replace("dXRmOA==", "")
|
|
80
|
+
|
|
81
|
+
return text
|
|
82
|
+
|
|
83
|
+
async def extract(self, url: str, referer: str = None) -> ExtractResult:
|
|
84
|
+
# URL'den ID çıkar
|
|
85
|
+
# https://veev.to/e/lla8v3k6arev
|
|
86
|
+
video_id = url.split("/")[-1]
|
|
87
|
+
|
|
88
|
+
# Sayfayı al
|
|
89
|
+
# Referer lazım mı? Genelde lazım olabilir.
|
|
90
|
+
page_url = f"{self.main_url}/e/{video_id}"
|
|
91
|
+
resp = await self.httpx.get(page_url, headers={"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"})
|
|
92
|
+
html = resp.text
|
|
93
|
+
|
|
94
|
+
# Regex ile şifreli stringleri bul
|
|
95
|
+
# Regex: [.\s'](?:fc|_vvto\[[^]]*)(?:['\]]*)?\s*[:=]\s*['"]([^'"]+)
|
|
96
|
+
# Python regex için düzenleme gerekebilir.
|
|
97
|
+
found_values = HTMLHelper(html).regex_all(r"[.\s'](?:fc|_vvto\[[^]]*)(?:['\]]*)?\s*[:=]\s*['\"]([^'\"]+)")
|
|
98
|
+
|
|
99
|
+
if not found_values:
|
|
100
|
+
raise ValueError(f"Veev: Token bulunamadı. {url}")
|
|
101
|
+
|
|
102
|
+
# Kotlin kodunda sondan başlayıp deniyor (reversed)
|
|
103
|
+
for f in reversed(found_values):
|
|
104
|
+
try:
|
|
105
|
+
ch = self.veev_decode(f)
|
|
106
|
+
if ch == f:
|
|
107
|
+
continue # Decode olmadıysa geç
|
|
108
|
+
|
|
109
|
+
# API Call
|
|
110
|
+
dl_url = f"{self.main_url}/dl?op=player_api&cmd=gi&file_code={video_id}&r={self.main_url}&ch={ch}&ie=1"
|
|
111
|
+
api_resp = await self.httpx.get(dl_url, headers={"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"})
|
|
112
|
+
|
|
113
|
+
data = api_resp.json()
|
|
114
|
+
file_obj = data.get("file")
|
|
115
|
+
if not file_obj or file_obj.get("file_status") != "OK":
|
|
116
|
+
continue
|
|
117
|
+
|
|
118
|
+
dv = file_obj.get("dv")
|
|
119
|
+
# dv json string içinde s key'inde olabilir (Kotlin: getString("s"))
|
|
120
|
+
# Ancak api yanıtını görmeden emin olamayız, json yapısına göre file->dv bir string mi object mi?
|
|
121
|
+
# Kotlin: file.getJSONArray("dv").getJSONObject(0).getString("s")
|
|
122
|
+
# Demek ki dv bir array
|
|
123
|
+
|
|
124
|
+
encoded_dv = None
|
|
125
|
+
if isinstance(dv, list) and len(dv) > 0:
|
|
126
|
+
if isinstance(dv[0], dict):
|
|
127
|
+
encoded_dv = dv[0].get("s")
|
|
128
|
+
|
|
129
|
+
if not encoded_dv:
|
|
130
|
+
continue
|
|
131
|
+
|
|
132
|
+
# Decode
|
|
133
|
+
# rules = buildArray(ch)[0]
|
|
134
|
+
rules = self.build_array(ch)[0]
|
|
135
|
+
|
|
136
|
+
final_url = self.decode_url(self.veev_decode(encoded_dv), rules)
|
|
137
|
+
|
|
138
|
+
if final_url.startswith("http"):
|
|
139
|
+
return ExtractResult(name=self.name, url=self.fix_url(final_url), referer=self.main_url)
|
|
140
|
+
|
|
141
|
+
except Exception as e:
|
|
142
|
+
# print(f"Veev Error: {e}")
|
|
143
|
+
continue
|
|
144
|
+
|
|
145
|
+
raise ValueError(f"Veev: Video URL'si çözülemedi. {url}")
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, HTMLHelper
|
|
4
|
+
from Kekik.Sifreleme import Packer
|
|
5
|
+
|
|
6
|
+
class VidBiz(ExtractorBase):
|
|
7
|
+
name = "VidBiz"
|
|
8
|
+
main_url = "https://videolar.biz"
|
|
9
|
+
|
|
10
|
+
async def extract(self, url: str, referer: str = None) -> list[ExtractResult]:
|
|
11
|
+
istek = await self.httpx.get(url, headers={"Referer": referer} if referer else None)
|
|
12
|
+
text = istek.text
|
|
13
|
+
|
|
14
|
+
# Eval script bul (kaken içeriyor olmalı)
|
|
15
|
+
eval_script = HTMLHelper(text).regex_first(r'(eval\(function[\s\S]+?)<\/script>') or \
|
|
16
|
+
HTMLHelper(text).regex_first(r'(eval\(function[\s\S]+)')
|
|
17
|
+
if not eval_script:
|
|
18
|
+
raise ValueError(f"VidBiz: Packed script bulunamadı. {url}")
|
|
19
|
+
|
|
20
|
+
unpacked = ""
|
|
21
|
+
try:
|
|
22
|
+
unpacked = Packer.unpack(eval_script)
|
|
23
|
+
except:
|
|
24
|
+
raise ValueError("VidBiz: Unpack hatası")
|
|
25
|
+
|
|
26
|
+
# window.kaken="..."
|
|
27
|
+
kaken = HTMLHelper(unpacked).regex_first(r'window\.kaken\s*=\s*"([^"]+)"')
|
|
28
|
+
if not kaken:
|
|
29
|
+
raise ValueError("VidBiz: Kaken token bulunamadı")
|
|
30
|
+
|
|
31
|
+
# API POST
|
|
32
|
+
# Content-Type: text/plain önemli olabilir
|
|
33
|
+
resp = await self.httpx.post(
|
|
34
|
+
url = "https://s2.videolar.biz/api/",
|
|
35
|
+
content = kaken, # data yerine content=raw string
|
|
36
|
+
headers = {"Content-Type": "text/plain", "Referer": url}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
try:
|
|
40
|
+
data = resp.json()
|
|
41
|
+
except:
|
|
42
|
+
raise ValueError("VidBiz: API yanıtı JSON değil")
|
|
43
|
+
|
|
44
|
+
if data.get("status") != "ok":
|
|
45
|
+
raise ValueError(f"VidBiz: API hatası {data}")
|
|
46
|
+
|
|
47
|
+
results = []
|
|
48
|
+
for source in data.get("sources", []):
|
|
49
|
+
file_url = source.get("file")
|
|
50
|
+
label = source.get("label", "Unknown")
|
|
51
|
+
|
|
52
|
+
if not file_url:
|
|
53
|
+
continue
|
|
54
|
+
|
|
55
|
+
results.append(ExtractResult(
|
|
56
|
+
name = f"{self.name} | {label}",
|
|
57
|
+
url = self.fix_url(file_url),
|
|
58
|
+
referer = url,
|
|
59
|
+
user_agent = self.httpx.headers.get("User-Agent", "")
|
|
60
|
+
))
|
|
61
|
+
|
|
62
|
+
return results
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, Subtitle, HTMLHelper
|
|
4
|
+
from Kekik.Sifreleme import Packer
|
|
5
|
+
import re
|
|
6
|
+
|
|
7
|
+
class VidHide(ExtractorBase):
|
|
8
|
+
name = "VidHide"
|
|
9
|
+
main_url = "https://vidhidepro.com"
|
|
10
|
+
|
|
11
|
+
# Birden fazla domain destekle
|
|
12
|
+
supported_domains = [
|
|
13
|
+
"vidhidepro.com", "vidhide.com", "rubyvidhub.com",
|
|
14
|
+
"vidhidevip.com", "vidhideplus.com", "vidhidepre.com",
|
|
15
|
+
"movearnpre.com", "oneupload.to",
|
|
16
|
+
"filelions.live", "filelions.online", "filelions.to",
|
|
17
|
+
"kinoger.be",
|
|
18
|
+
"smoothpre.com",
|
|
19
|
+
"dhtpre.com",
|
|
20
|
+
"peytonepre.com"
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
def can_handle_url(self, url: str) -> bool:
|
|
24
|
+
return any(domain in url for domain in self.supported_domains)
|
|
25
|
+
|
|
26
|
+
def get_embed_url(self, url: str) -> str:
|
|
27
|
+
if "/d/" in url:
|
|
28
|
+
return url.replace("/d/", "/v/")
|
|
29
|
+
elif "/download/" in url:
|
|
30
|
+
return url.replace("/download/", "/v/")
|
|
31
|
+
elif "/file/" in url:
|
|
32
|
+
return url.replace("/file/", "/v/")
|
|
33
|
+
elif "/embed/" in url:
|
|
34
|
+
return url.replace("/embed/", "/v/")
|
|
35
|
+
else:
|
|
36
|
+
return url.replace("/f/", "/v/")
|
|
37
|
+
|
|
38
|
+
async def extract(self, url: str, referer: str = None) -> ExtractResult:
|
|
39
|
+
base_url = self.get_base_url(url)
|
|
40
|
+
self.httpx.headers.update({
|
|
41
|
+
"Referer" : referer or base_url,
|
|
42
|
+
"Origin" : base_url,
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
embed_url = self.get_embed_url(url)
|
|
46
|
+
istek = await self.httpx.get(embed_url, follow_redirects=True)
|
|
47
|
+
text = istek.text
|
|
48
|
+
|
|
49
|
+
# Silinmiş dosya kontrolü
|
|
50
|
+
if "File is no longer available" in text or "File Not Found" in text:
|
|
51
|
+
raise ValueError(f"VidHide: Video silinmiş. {url}")
|
|
52
|
+
|
|
53
|
+
# JS Redirect Kontrolü (OneUpload vb.)
|
|
54
|
+
if js_redirect := HTMLHelper(text).regex_first(r"window\.location\.replace\(['\"]([^'\"]+)['\"]\)") or \
|
|
55
|
+
HTMLHelper(text).regex_first(r"window\.location\.href\s*=\s*['\"]([^'\"]+)['\"]"):
|
|
56
|
+
# Redirect url'i al
|
|
57
|
+
target_url = js_redirect
|
|
58
|
+
# Bazen path relative olabilir ama genelde full url
|
|
59
|
+
if not target_url.startswith("http"):
|
|
60
|
+
# urljoin gerekebilir ama şimdilik doğrudan deneyelim veya fix_url
|
|
61
|
+
target_url = self.fix_url(target_url) # fix_url base'e göre düzeltebilir mi? ExtractorBase.fix_url genelde şema ekler.
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
# Yeniden istek at
|
|
65
|
+
istek = await self.httpx.get(target_url, headers={"Referer": embed_url}, follow_redirects=True)
|
|
66
|
+
text = istek.text
|
|
67
|
+
|
|
68
|
+
sel = HTMLHelper(text)
|
|
69
|
+
|
|
70
|
+
unpacked = ""
|
|
71
|
+
# Eval script bul (regex ile daha sağlam)
|
|
72
|
+
if eval_match := sel.regex_first(r'(eval\s*\(\s*function[\s\S]+?)<\/script>'):
|
|
73
|
+
try:
|
|
74
|
+
unpacked = Packer.unpack(eval_match)
|
|
75
|
+
if "var links" in unpacked:
|
|
76
|
+
unpacked = unpacked.split("var links")[1]
|
|
77
|
+
except:
|
|
78
|
+
pass
|
|
79
|
+
|
|
80
|
+
content = unpacked or text
|
|
81
|
+
|
|
82
|
+
# Regex: Kotlin mantığı (: "url")
|
|
83
|
+
# Ayrıca sources: [...] mantığını da ekle
|
|
84
|
+
m3u8_url = HTMLHelper(content).regex_first(r'sources:\s*\[\s*\{\s*file:\s*"([^"]+)"')
|
|
85
|
+
|
|
86
|
+
if not m3u8_url:
|
|
87
|
+
# Genel arama (hls:, file: vb.)
|
|
88
|
+
# Kotlin Regex: :\s*"(.*?m3u8.*?)"
|
|
89
|
+
match = HTMLHelper(content).regex_first(r':\s*["\']([^"\']+\.m3u8[^"\']*)["\']')
|
|
90
|
+
if match:
|
|
91
|
+
m3u8_url = match
|
|
92
|
+
|
|
93
|
+
if not m3u8_url:
|
|
94
|
+
# Son şans: herhangi bir m3u8 linki
|
|
95
|
+
m3u8_url = HTMLHelper(content).regex_first(r'["\']([^"\']+\.m3u8[^"\']*)["\']')
|
|
96
|
+
|
|
97
|
+
if not m3u8_url:
|
|
98
|
+
raise ValueError(f"VidHide: Video URL bulunamadı. {url}")
|
|
99
|
+
|
|
100
|
+
return ExtractResult(
|
|
101
|
+
name = self.name,
|
|
102
|
+
url = self.fix_url(m3u8_url),
|
|
103
|
+
referer = f"{base_url}/",
|
|
104
|
+
user_agent = self.httpx.headers.get("User-Agent", "")
|
|
105
|
+
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
|
|
2
|
+
|
|
3
|
+
from KekikStream.Core import ExtractorBase, ExtractResult, HTMLHelper
|
|
4
|
+
from Kekik.Sifreleme import Packer
|
|
5
|
+
|
|
6
|
+
class Vtbe(ExtractorBase):
|
|
7
|
+
name = "Vtbe"
|
|
8
|
+
main_url = "https://vtbe.to"
|
|
9
|
+
|
|
10
|
+
async def extract(self, url: str, referer: str = None) -> list[ExtractResult]:
|
|
11
|
+
# Iframe ise embed url'i düzeltmek gerekebilir ama genelde embed-xxxx.html formatı
|
|
12
|
+
istek = await self.httpx.get(url, headers={"Referer": referer or self.main_url})
|
|
13
|
+
text = istek.text
|
|
14
|
+
|
|
15
|
+
# Packed script bul: function(p,a,c,k,e,d)
|
|
16
|
+
packed = HTMLHelper(text).regex_first(r'(eval\s*\(\s*function[\s\S]+?)<\/script>')
|
|
17
|
+
|
|
18
|
+
if not packed:
|
|
19
|
+
raise ValueError(f"Vtbe: Packed script bulunamadı. {url}")
|
|
20
|
+
|
|
21
|
+
unpacked = ""
|
|
22
|
+
try:
|
|
23
|
+
unpacked = Packer.unpack(packed)
|
|
24
|
+
except:
|
|
25
|
+
raise ValueError("Vtbe: Unpack hatası")
|
|
26
|
+
|
|
27
|
+
# sources:[{file:"..."
|
|
28
|
+
file_url = HTMLHelper(unpacked).regex_first(r'sources:\s*\[\s*\{\s*file:\s*"([^"]+)"')
|
|
29
|
+
|
|
30
|
+
if not file_url:
|
|
31
|
+
raise ValueError("Vtbe: Video URL (file) bulunamadı")
|
|
32
|
+
|
|
33
|
+
return ExtractResult(
|
|
34
|
+
name = self.name,
|
|
35
|
+
url = self.fix_url(file_url),
|
|
36
|
+
referer = url,
|
|
37
|
+
user_agent = self.httpx.headers.get("User-Agent", "")
|
|
38
|
+
)
|
|
@@ -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, HTMLHelper
|
|
4
|
+
|
|
5
|
+
class Zeus(ExtractorBase):
|
|
6
|
+
name = "Zeus"
|
|
7
|
+
main_url = "https://d2rs.com"
|
|
8
|
+
|
|
9
|
+
async def extract(self, url: str, referer: str = None) -> list[ExtractResult]:
|
|
10
|
+
# Iframe içeriğini al
|
|
11
|
+
istek = await self.httpx.get(url, headers={"Referer": referer} if referer else None)
|
|
12
|
+
text = istek.text
|
|
13
|
+
|
|
14
|
+
# 'q' parametresini bul
|
|
15
|
+
# form.append("q", "...")
|
|
16
|
+
q_param = HTMLHelper(text).regex_first(r'form\.append\("q",\s*"([^"]+)"\)')
|
|
17
|
+
|
|
18
|
+
if not q_param:
|
|
19
|
+
raise ValueError(f"Zeus: 'q' parametresi bulunamadı. {url}")
|
|
20
|
+
|
|
21
|
+
# API'ye POST at
|
|
22
|
+
resp = await self.httpx.post(
|
|
23
|
+
url = "https://d2rs.com/zeus/api.php",
|
|
24
|
+
data = {"q": q_param},
|
|
25
|
+
headers = {"Referer": url}
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
try:
|
|
29
|
+
sources = resp.json()
|
|
30
|
+
except:
|
|
31
|
+
raise ValueError("Zeus: API yanıtı geçersiz JSON")
|
|
32
|
+
|
|
33
|
+
results = []
|
|
34
|
+
# [{"file": "...", "label": "Full HD", "type": "video/mp4"}, ...]
|
|
35
|
+
for i, source in enumerate(sources, 1):
|
|
36
|
+
file_path = source.get("file")
|
|
37
|
+
label = source.get("label") or ""
|
|
38
|
+
type_ = source.get("type", "")
|
|
39
|
+
|
|
40
|
+
if not file_path:
|
|
41
|
+
continue
|
|
42
|
+
|
|
43
|
+
full_url = f"https://d2rs.com/zeus/{file_path}"
|
|
44
|
+
|
|
45
|
+
# İsimlendirme
|
|
46
|
+
if label:
|
|
47
|
+
source_name = f"{self.name} | {label}"
|
|
48
|
+
else:
|
|
49
|
+
source_name = f"{self.name} | Kaynak {i}"
|
|
50
|
+
|
|
51
|
+
results.append(ExtractResult(
|
|
52
|
+
name = source_name,
|
|
53
|
+
url = self.fix_url(full_url),
|
|
54
|
+
referer = url,
|
|
55
|
+
user_agent = self.httpx.headers.get("User-Agent", "")
|
|
56
|
+
))
|
|
57
|
+
|
|
58
|
+
if not results:
|
|
59
|
+
raise ValueError("Zeus: Kaynak bulunamadı")
|
|
60
|
+
|
|
61
|
+
return results
|