KekikStream 0.7.1__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of KekikStream might be problematic. Click here for more details.

Files changed (59) hide show
  1. KekikStream/CLI/__init__.py +4 -0
  2. KekikStream/CLI/pypi_kontrol.py +30 -0
  3. KekikStream/Core/ExtractorBase.py +42 -0
  4. KekikStream/Core/ExtractorLoader.py +82 -0
  5. KekikStream/Core/ExtractorModels.py +19 -0
  6. KekikStream/Core/MediaHandler.py +142 -0
  7. KekikStream/Core/PluginBase.py +80 -0
  8. KekikStream/Core/PluginLoader.py +61 -0
  9. KekikStream/Core/PluginModels.py +63 -0
  10. KekikStream/Core/__init__.py +9 -0
  11. KekikStream/Extractors/CloseLoad.py +31 -0
  12. KekikStream/Extractors/ContentX.py +80 -0
  13. KekikStream/Extractors/FourCX.py +7 -0
  14. KekikStream/Extractors/FourPichive.py +7 -0
  15. KekikStream/Extractors/FourPlayRu.py +7 -0
  16. KekikStream/Extractors/HDStreamAble.py +7 -0
  17. KekikStream/Extractors/Hotlinger.py +7 -0
  18. KekikStream/Extractors/MailRu.py +40 -0
  19. KekikStream/Extractors/MixPlayHD.py +42 -0
  20. KekikStream/Extractors/Odnoklassniki.py +106 -0
  21. KekikStream/Extractors/OkRuHTTP.py +7 -0
  22. KekikStream/Extractors/OkRuSSL.py +7 -0
  23. KekikStream/Extractors/PeaceMakerst.py +57 -0
  24. KekikStream/Extractors/Pichive.py +7 -0
  25. KekikStream/Extractors/PixelDrain.py +28 -0
  26. KekikStream/Extractors/PlayRu.py +7 -0
  27. KekikStream/Extractors/RapidVid.py +60 -0
  28. KekikStream/Extractors/SibNet.py +29 -0
  29. KekikStream/Extractors/Sobreatsesuyp.py +59 -0
  30. KekikStream/Extractors/TRsTX.py +67 -0
  31. KekikStream/Extractors/TauVideo.py +34 -0
  32. KekikStream/Extractors/TurboImgz.py +25 -0
  33. KekikStream/Extractors/VidMoly.py +85 -0
  34. KekikStream/Extractors/VidMoxy.py +50 -0
  35. KekikStream/Extractors/VideoSeyred.py +47 -0
  36. KekikStream/Managers/ExtractorManager.py +27 -0
  37. KekikStream/Managers/MediaManager.py +19 -0
  38. KekikStream/Managers/PluginManager.py +19 -0
  39. KekikStream/Managers/UIManager.py +49 -0
  40. KekikStream/Managers/__init__.py +6 -0
  41. KekikStream/Plugins/DiziBox.py +143 -0
  42. KekikStream/Plugins/DiziYou.py +127 -0
  43. KekikStream/Plugins/Dizilla.py +106 -0
  44. KekikStream/Plugins/FilmMakinesi.py +65 -0
  45. KekikStream/Plugins/FullHDFilmizlesene.py +78 -0
  46. KekikStream/Plugins/JetFilmizle.py +92 -0
  47. KekikStream/Plugins/RecTV.py +113 -0
  48. KekikStream/Plugins/SezonlukDizi.py +108 -0
  49. KekikStream/Plugins/SineWix.py +108 -0
  50. KekikStream/Plugins/UgurFilm.py +75 -0
  51. KekikStream/__init__.py +255 -0
  52. KekikStream/__main__.py +6 -0
  53. KekikStream/requirements.txt +10 -0
  54. KekikStream-0.7.1.dist-info/LICENSE +674 -0
  55. KekikStream-0.7.1.dist-info/METADATA +94 -0
  56. KekikStream-0.7.1.dist-info/RECORD +59 -0
  57. KekikStream-0.7.1.dist-info/WHEEL +5 -0
  58. KekikStream-0.7.1.dist-info/entry_points.txt +2 -0
  59. KekikStream-0.7.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,75 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
3
+ from KekikStream.Core import PluginBase, SearchResult, MovieInfo
4
+ from parsel import Selector
5
+
6
+ class UgurFilm(PluginBase):
7
+ name = "UgurFilm"
8
+ main_url = "https://ugurfilm8.com"
9
+
10
+ async def search(self, query: str) -> list[SearchResult]:
11
+ istek = await self.oturum.get(f"{self.main_url}/?s={query}")
12
+ secici = Selector(istek.text)
13
+
14
+ results = []
15
+ for film in secici.css("div.icerik div"):
16
+ title = film.css("span:nth-child(1)::text").get()
17
+ href = film.css("a::attr(href)").get()
18
+ poster = film.css("img::attr(src)").get()
19
+
20
+ if title and href:
21
+ results.append(
22
+ SearchResult(
23
+ title = title.strip(),
24
+ url = self.fix_url(href.strip()),
25
+ poster = self.fix_url(poster.strip()) if poster else None,
26
+ )
27
+ )
28
+
29
+ return results
30
+
31
+ async def load_item(self, url: str) -> MovieInfo:
32
+ istek = await self.oturum.get(url)
33
+ secici = Selector(istek.text)
34
+
35
+ title = secici.css("div.bilgi h2::text").get().strip()
36
+ poster = secici.css("div.resim img::attr(src)").get().strip()
37
+ description = secici.css("div.slayt-aciklama::text").get().strip()
38
+ tags = secici.css("p.tur a[href*='/category/']::text").getall()
39
+ year = secici.css("a[href*='/yil/']::text").re_first(r"\d+")
40
+ actors = [actor.css("span::text").get() for actor in secici.css("li.oyuncu-k")]
41
+
42
+ return MovieInfo(
43
+ url = self.fix_url(url),
44
+ poster = self.fix_url(poster),
45
+ title = title,
46
+ description = description,
47
+ tags = tags,
48
+ year = year,
49
+ actors = actors,
50
+ )
51
+
52
+ async def load_links(self, url: str) -> list[str]:
53
+ istek = await self.oturum.get(url)
54
+ secici = Selector(istek.text)
55
+ results = []
56
+
57
+ for part_link in secici.css("li.parttab a::attr(href)").getall():
58
+ sub_response = await self.oturum.get(part_link)
59
+ sub_selector = Selector(sub_response.text)
60
+
61
+ iframe = sub_selector.css("div#vast iframe::attr(src)").get()
62
+ if iframe and self.main_url in iframe:
63
+ post_data = {
64
+ "vid" : iframe.split("vid=")[-1],
65
+ "alternative" : "default",
66
+ "ord" : "1",
67
+ }
68
+ player_response = await self.oturum.post(
69
+ url = f"{self.main_url}/player/ajax_sources.php",
70
+ data = post_data
71
+ )
72
+ iframe = player_response.json().get("iframe")
73
+ results.append(iframe)
74
+
75
+ return results
@@ -0,0 +1,255 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
3
+ from .CLI import konsol, cikis_yap, hata_yakala, pypi_kontrol_guncelle
4
+ from .Managers import PluginManager, ExtractorManager, UIManager, MediaManager
5
+ from .Core import PluginBase, ExtractorBase, SeriesInfo
6
+ from asyncio import run
7
+ from contextlib import suppress
8
+
9
+ class KekikStream:
10
+ def __init__(self):
11
+ self.eklentiler_yonetici = PluginManager()
12
+ self.cikaricilar_yonetici = ExtractorManager()
13
+ self.arayuz_yonetici = UIManager()
14
+ self.medya_yonetici = MediaManager()
15
+ self.suanki_eklenti: PluginBase = None
16
+
17
+ async def baslat(self):
18
+ self.arayuz_yonetici.clear_console()
19
+ konsol.rule("[bold cyan]KekikStream Başlatılıyor[/bold cyan]")
20
+ if not self.eklentiler_yonetici.get_plugin_names():
21
+ return konsol.print("[bold red]Hiçbir eklenti bulunamadı![/bold red]")
22
+
23
+ try:
24
+ await self.eklenti_secimi()
25
+ finally:
26
+ await self.eklentiler_yonetici.close_plugins()
27
+
28
+ async def sonuc_bulunamadi(self):
29
+ secim = await self.arayuz_yonetici.select_from_list(
30
+ message = "Ne yapmak istersiniz?",
31
+ choices = ["Tüm Eklentilerde Ara", "Ana Menü", "Çıkış"]
32
+ )
33
+
34
+ match secim:
35
+ case "Tüm Eklentilerde Ara":
36
+ await self.tum_eklentilerde_arama()
37
+ case "Ana Menü":
38
+ await self.baslat()
39
+ case "Çıkış":
40
+ cikis_yap(False)
41
+
42
+ async def eklenti_secimi(self):
43
+ eklenti_adi = await self.arayuz_yonetici.select_from_fuzzy(
44
+ message = "Arama yapılacak eklentiyi seçin:",
45
+ choices = ["Tüm Eklentilerde Ara", *self.eklentiler_yonetici.get_plugin_names()]
46
+ )
47
+
48
+ if eklenti_adi == "Tüm Eklentilerde Ara":
49
+ await self.tum_eklentilerde_arama()
50
+ else:
51
+ self.suanki_eklenti = self.eklentiler_yonetici.select_plugin(eklenti_adi)
52
+ await self.eklenti_ile_arama()
53
+
54
+ async def eklenti_ile_arama(self):
55
+ self.arayuz_yonetici.clear_console()
56
+ konsol.rule(f"[bold cyan]{self.suanki_eklenti.name} Eklentisinde Arama Yapın[/bold cyan]")
57
+
58
+ sorgu = await self.arayuz_yonetici.prompt_text("Arama sorgusu girin:")
59
+ sonuclar = await self.suanki_eklenti.search(sorgu)
60
+
61
+ if not sonuclar:
62
+ konsol.print("[bold red]Arama sonucu bulunamadı![/bold red]")
63
+ return await self.sonuc_bulunamadi()
64
+
65
+ if secilen_sonuc := await self.eklenti_sonuc_secimi(sonuclar):
66
+ await self.sonuc_detaylari_goster({"plugin": self.suanki_eklenti.name, "url": secilen_sonuc})
67
+
68
+ async def eklenti_sonuc_secimi(self, sonuclar):
69
+ return await self.arayuz_yonetici.select_from_fuzzy(
70
+ message = "İçerik sonuçlarından birini seçin:",
71
+ choices = [{"name": sonuc.title, "value": sonuc.url} for sonuc in sonuclar]
72
+ )
73
+
74
+ async def tum_eklentilerde_arama(self):
75
+ self.arayuz_yonetici.clear_console()
76
+ konsol.rule("[bold cyan]Tüm Eklentilerde Arama Yapın[/bold cyan]")
77
+
78
+ sorgu = await self.arayuz_yonetici.prompt_text("Arama sorgusu girin:")
79
+ sonuclar = await self.tum_eklentilerde_arama_sorgula(sorgu)
80
+
81
+ if not sonuclar:
82
+ return await self.sonuc_bulunamadi()
83
+
84
+ secilen_sonuc = await self.tum_sonuc_secimi(sonuclar)
85
+
86
+ if secilen_sonuc:
87
+ return await self.sonuc_detaylari_goster(secilen_sonuc)
88
+
89
+ async def tum_eklentilerde_arama_sorgula(self, sorgu: str) -> list:
90
+ tum_sonuclar = []
91
+
92
+ for eklenti_adi, eklenti in self.eklentiler_yonetici.plugins.items():
93
+ if not isinstance(eklenti, PluginBase):
94
+ konsol.print(f"[yellow][!] {eklenti_adi} geçerli bir PluginBase değil, atlanıyor...[/yellow]")
95
+ continue
96
+
97
+ konsol.log(f"[yellow][~] {eklenti_adi:<19} aranıyor...[/]")
98
+ try:
99
+ sonuclar = await eklenti.search(sorgu)
100
+ if sonuclar:
101
+ tum_sonuclar.extend(
102
+ [{"plugin": eklenti_adi, "title": sonuc.title, "url": sonuc.url, "poster": sonuc.poster} for sonuc in sonuclar]
103
+ )
104
+ except Exception as hata:
105
+ konsol.print(f"[bold red]{eklenti_adi} » hata oluştu: {hata}[/bold red]")
106
+
107
+ if not tum_sonuclar:
108
+ konsol.print("[bold red]Hiçbir sonuç bulunamadı![/bold red]")
109
+ await self.sonuc_bulunamadi()
110
+ return []
111
+
112
+ return tum_sonuclar
113
+
114
+ async def tum_sonuc_secimi(self, sonuclar):
115
+ secenekler = [
116
+ {"name": f"[{sonuc['plugin']}]".ljust(21) + f" » {sonuc['title']}", "value": sonuc}
117
+ for sonuc in sonuclar
118
+ ]
119
+
120
+ return await self.arayuz_yonetici.select_from_fuzzy(
121
+ message = "Arama sonuçlarından bir içerik seçin:",
122
+ choices = secenekler
123
+ )
124
+
125
+ async def sonuc_detaylari_goster(self, secilen_sonuc):
126
+ try:
127
+ if isinstance(secilen_sonuc, dict) and "plugin" in secilen_sonuc:
128
+ eklenti_adi = secilen_sonuc["plugin"]
129
+ url = secilen_sonuc["url"]
130
+
131
+ self.suanki_eklenti = self.eklentiler_yonetici.select_plugin(eklenti_adi)
132
+ else:
133
+ url = secilen_sonuc
134
+
135
+ medya_bilgi = None
136
+ for _ in range(3):
137
+ with suppress(Exception):
138
+ medya_bilgi = await self.suanki_eklenti.load_item(url)
139
+ break
140
+ if not medya_bilgi:
141
+ konsol.print("[bold red]Medya bilgileri yüklenemedi![/bold red]")
142
+ return await self.sonuc_bulunamadi()
143
+
144
+ except Exception as hata:
145
+ konsol.log(secilen_sonuc)
146
+ return hata_yakala(hata)
147
+
148
+ self.medya_yonetici.set_title(f"{self.suanki_eklenti.name} | {medya_bilgi.title}")
149
+ self.arayuz_yonetici.display_media_info(f"{self.suanki_eklenti.name} | {medya_bilgi.title}", medya_bilgi)
150
+
151
+ if isinstance(medya_bilgi, SeriesInfo):
152
+ secilen_bolum = await self.arayuz_yonetici.select_from_fuzzy(
153
+ message = "İzlemek istediğiniz bölümü seçin:",
154
+ choices = [
155
+ {"name": f"{bolum.season}. Sezon {bolum.episode}. Bölüm - {bolum.title}", "value": bolum.url}
156
+ for bolum in medya_bilgi.episodes
157
+ ]
158
+ )
159
+ if secilen_bolum:
160
+ baglantilar = await self.suanki_eklenti.load_links(secilen_bolum)
161
+ await self.baglanti_secenekleri_goster(baglantilar)
162
+ else:
163
+ baglantilar = await self.suanki_eklenti.load_links(medya_bilgi.url)
164
+ await self.baglanti_secenekleri_goster(baglantilar)
165
+
166
+ async def baglanti_secenekleri_goster(self, baglantilar):
167
+ if not baglantilar:
168
+ konsol.print("[bold red]Hiçbir bağlantı bulunamadı![/bold red]")
169
+ return await self.sonuc_bulunamadi()
170
+
171
+ haritalama = self.cikaricilar_yonetici.map_links_to_extractors(baglantilar)
172
+ play_fonksiyonu_var = hasattr(self.suanki_eklenti, "play") and callable(getattr(self.suanki_eklenti, "play", None))
173
+ # ! DEBUG
174
+ # konsol.print(baglantilar)
175
+ if not haritalama and not play_fonksiyonu_var:
176
+ konsol.print("[bold red]Hiçbir Extractor bulunamadı![/bold red]")
177
+ konsol.print(baglantilar)
178
+ return await self.sonuc_bulunamadi()
179
+
180
+ if not haritalama:
181
+ secilen_link = await self.arayuz_yonetici.select_from_list(
182
+ message = "Doğrudan oynatmak için bir bağlantı seçin:",
183
+ choices = [{"name": value["ext_name"], "value": key} for key, value in self.suanki_eklenti._data.items()]
184
+ )
185
+ if secilen_link:
186
+ await self.medya_oynat(secilen_link)
187
+ return
188
+
189
+ secim = await self.arayuz_yonetici.select_from_list(
190
+ message = "Ne yapmak istersiniz?",
191
+ choices = ["İzle", "Tüm Eklentilerde Ara", "Ana Menü"]
192
+ )
193
+
194
+ match secim:
195
+ case "İzle":
196
+ secilen_link = await self.arayuz_yonetici.select_from_list(
197
+ message = "İzlemek için bir bağlantı seçin:",
198
+ choices = [{"name": cikarici_adi, "value": link} for link, cikarici_adi in haritalama.items()]
199
+ )
200
+ if secilen_link:
201
+ await self.medya_oynat(secilen_link)
202
+
203
+ case "Tüm Eklentilerde Ara":
204
+ await self.tum_eklentilerde_arama()
205
+
206
+ case _:
207
+ await self.baslat()
208
+
209
+ async def medya_oynat(self, secilen_link):
210
+ if hasattr(self.suanki_eklenti, "play") and callable(self.suanki_eklenti.play):
211
+ konsol.log(f"[yellow][»] Oynatılıyor : {secilen_link}")
212
+ return await self.suanki_eklenti.play(
213
+ name = self.suanki_eklenti._data[secilen_link]["name"],
214
+ url = secilen_link,
215
+ referer = self.suanki_eklenti._data[secilen_link]["referer"],
216
+ subtitles = self.suanki_eklenti._data[secilen_link]["subtitles"]
217
+ )
218
+
219
+ cikarici: ExtractorBase = self.cikaricilar_yonetici.find_extractor(secilen_link)
220
+ if not cikarici:
221
+ return konsol.print("[bold red]Uygun Extractor bulunamadı.[/bold red]")
222
+
223
+ try:
224
+ extract_data = await cikarici.extract(secilen_link, referer=self.suanki_eklenti.main_url)
225
+ except Exception as hata:
226
+ konsol.print(f"[bold red]{cikarici.name} » hata oluştu: {hata}[/bold red]")
227
+ return await self.sonuc_bulunamadi()
228
+
229
+ if isinstance(extract_data, list):
230
+ secilen_data = await self.arayuz_yonetici.select_from_list(
231
+ message = "Birden fazla bağlantı bulundu, lütfen birini seçin:",
232
+ choices = [{"name": data.name, "value": data} for data in extract_data]
233
+ )
234
+ else:
235
+ secilen_data = extract_data
236
+
237
+ if secilen_data.headers.get("Cookie"):
238
+ self.medya_yonetici.set_headers({"Cookie": secilen_data.headers.get("Cookie")})
239
+
240
+ self.medya_yonetici.set_title(f"{self.medya_yonetici.get_title()} | {secilen_data.name}")
241
+ self.medya_yonetici.set_headers({"Referer": secilen_data.referer})
242
+ konsol.log(f"[yellow][»] Oynatılıyor : {secilen_data.url}")
243
+ self.medya_yonetici.play_media(secilen_data)
244
+
245
+ def basla():
246
+ try:
247
+ pypi_kontrol_guncelle("KekikStream")
248
+
249
+ app = KekikStream()
250
+ run(app.baslat())
251
+ cikis_yap(False)
252
+ except KeyboardInterrupt:
253
+ cikis_yap(True)
254
+ except Exception as hata:
255
+ hata_yakala(hata)
@@ -0,0 +1,6 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
3
+ from . import basla
4
+
5
+ if __name__ == "__main__":
6
+ basla()
@@ -0,0 +1,10 @@
1
+ setuptools
2
+ wheel
3
+
4
+ Kekik
5
+ httpx[http2]
6
+ cloudscraper
7
+ parsel
8
+
9
+ pydantic
10
+ InquirerPy