KekikStream 0.1.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.
@@ -4,6 +4,8 @@ from abc import ABC, abstractmethod
4
4
  from httpx import AsyncClient, Timeout
5
5
  from .PluginModels import SearchResult, MovieInfo
6
6
  from .MediaHandler import MediaHandler
7
+ from urllib.parse import urljoin
8
+ import re
7
9
 
8
10
  class PluginBase(ABC):
9
11
  name = "Plugin"
@@ -38,8 +40,40 @@ class PluginBase(ABC):
38
40
  async def close(self):
39
41
  await self.oturum.aclose()
40
42
 
41
- def fix_url(self, partial_url: str):
42
- if partial_url.startswith("http"):
43
- return partial_url
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
44
49
 
45
- return self.main_url.rstrip("/") + "/" + partial_url.lstrip("/")
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
@@ -52,7 +52,7 @@ class SeriesInfo(BaseModel):
52
52
  title : Optional[str] = None
53
53
  description : Optional[str] = None
54
54
  tags : Optional[str] = None
55
- rating : Optional[float] = None
55
+ rating : Optional[str] = None
56
56
  year : Optional[str] = None
57
57
  actors : Optional[str] = None
58
58
  episodes : Optional[List[Episode]] = None
@@ -65,4 +65,9 @@ class SeriesInfo(BaseModel):
65
65
  @field_validator("actors", mode="before")
66
66
  @classmethod
67
67
  def convert_actors(cls, value):
68
- return ", ".join(value) if isinstance(value, list) else 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
@@ -11,7 +11,7 @@ class PixelDrain(ExtractorBase):
11
11
  if referer:
12
12
  self.oturum.headers.update({"Referer": referer})
13
13
 
14
- pixel_id_match = re.search(r"([^\/]+)(?=\?download)", url)
14
+ pixel_id_match = re.search(r"/u/([^/?]+)|([^\/]+)(?=\?download)", url)
15
15
  if not pixel_id_match:
16
16
  raise ValueError("PixelDrain bağlantısından ID çıkarılamadı.")
17
17
 
@@ -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)
@@ -0,0 +1,96 @@
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 JetFilmizle(PluginBase):
7
+ name = "JetFilmizle"
8
+ main_url = "https://jetfilmizle.media"
9
+
10
+ async def search(self, query: str) -> list[SearchResult]:
11
+ istek = await self.oturum.post(
12
+ url = f"{self.main_url}/filmara.php",
13
+ data = {"s": query},
14
+ headers = {"Referer": f"{self.main_url}/"}
15
+ )
16
+ secici = Selector(istek.text)
17
+
18
+ results = []
19
+ for article in secici.css("article.movie"):
20
+ title = self.clean_title(article.css("h2 a::text, h3 a::text, h4 a::text, h5 a::text, h6 a::text").get())
21
+ href = article.css("a::attr(href)").get()
22
+ poster = article.css("img::attr(data-src)").get() or article.css("img::attr(src)").get()
23
+
24
+ if title and href:
25
+ results.append(
26
+ SearchResult(
27
+ title = title.strip(),
28
+ url = self.fix_url(href.strip()),
29
+ poster = self.fix_url(poster.strip()) if poster else None,
30
+ )
31
+ )
32
+
33
+ return results
34
+
35
+ async def load_item(self, url: str) -> MovieInfo:
36
+ istek = await self.oturum.get(url)
37
+ secici = Selector(istek.text)
38
+
39
+ title = self.clean_title(secici.css("div.movie-exp-title::text").get())
40
+ poster = secici.css("section.movie-exp img::attr(data-src), section.movie-exp img::attr(src)").get().strip()
41
+ description = secici.css("section.movie-exp p.aciklama::text").get().strip()
42
+ tags = secici.css("section.movie-exp div.catss a::text").getall()
43
+ rating = secici.css("section.movie-exp div.imdb_puan span::text").get().strip()
44
+ year = secici.xpath("//div[@class='yap' and (contains(., 'Vizyon') or contains(., 'Yapım'))]/text()").get().strip()
45
+ actors = secici.css("div[itemprop='actor'] a span::text").getall()
46
+
47
+ return MovieInfo(
48
+ url = url,
49
+ poster = self.fix_url(poster),
50
+ title = title,
51
+ description = description,
52
+ tags = tags,
53
+ rating = rating,
54
+ year = year,
55
+ actors = actors
56
+ )
57
+
58
+ async def load_links(self, url: str) -> list[str]:
59
+ istek = await self.oturum.get(url)
60
+ secici = Selector(istek.text)
61
+
62
+ iframes = []
63
+ main_iframe = secici.css("div#movie iframe::attr(data-src), div#movie iframe::attr(data), div#movie iframe::attr(src)").get()
64
+ if main_iframe:
65
+ iframes.append(self.fix_url(main_iframe))
66
+
67
+ for part in secici.css("div.film_part a"):
68
+ part_href = part.attrib.get("href")
69
+ if not part_href:
70
+ continue
71
+
72
+ part_istek = await self.oturum.get(part_href)
73
+ part_secici = Selector(part_istek.text)
74
+
75
+ iframe = part_secici.css("div#movie iframe::attr(data-src), div#movie iframe::attr(data), div#movie iframe::attr(src)").get()
76
+ if iframe:
77
+ iframes.append(self.fix_url(iframe))
78
+ else:
79
+ for link in part_secici.css("div#movie p a"):
80
+ download_link = link.attrib.get("href")
81
+ if download_link:
82
+ iframes.append(self.fix_url(download_link))
83
+
84
+ processed_iframes = []
85
+ for iframe in iframes:
86
+ if "jetv.xyz" in iframe:
87
+ jetv_istek = await self.oturum.get(iframe)
88
+ jetv_secici = Selector(jetv_istek.text)
89
+
90
+ jetv_iframe = jetv_secici.css("iframe::attr(src)").get()
91
+ if jetv_iframe:
92
+ processed_iframes.append(self.fix_url(jetv_iframe))
93
+ else:
94
+ processed_iframes.append(iframe)
95
+
96
+ return processed_iframes
@@ -0,0 +1,108 @@
1
+ # Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
2
+
3
+ from KekikStream.Core import PluginBase, SearchResult, SeriesInfo, Episode
4
+ from parsel import Selector
5
+
6
+ class SezonlukDizi(PluginBase):
7
+ name = "SezonlukDizi"
8
+ main_url = "https://sezonlukdizi6.com"
9
+
10
+ async def search(self, query: str) -> list[SearchResult]:
11
+ istek = await self.oturum.get(f"{self.main_url}/diziler.asp?adi={query}")
12
+ secici = Selector(istek.text)
13
+
14
+ return [
15
+ SearchResult(
16
+ title = afis.css("div.description::text").get(default="").strip(),
17
+ url = self.fix_url(afis.attrib.get("href")),
18
+ poster = self.fix_url(afis.css("img::attr(data-src)").get()),
19
+ )
20
+ for afis in secici.css("div.afis a.column")
21
+ ]
22
+
23
+ async def load_item(self, url: str) -> SeriesInfo:
24
+ istek = await self.oturum.get(url)
25
+ secici = Selector(istek.text)
26
+
27
+ title = secici.css("div.header::text").get(default="").strip()
28
+ poster = self.fix_url(secici.css("div.image img::attr(data-src)").get(default="").strip())
29
+ year = secici.css("div.extra span::text").re_first(r"(\d{4})")
30
+ description = secici.css("span#tartismayorum-konu::text").get(default="").strip()
31
+ tags = secici.css("div.labels a[href*='tur']::text").getall()
32
+ rating = secici.css("div.dizipuani a div::text").re_first(r"[\d.,]+")
33
+ actors = []
34
+
35
+ actors_istek = await self.oturum.get(f"{self.main_url}/oyuncular/{url.split('/')[-1]}")
36
+ actors_secici = Selector(actors_istek.text)
37
+ actors = [
38
+ actor.css("div.header::text").get().strip()
39
+ for actor in actors_secici.css("div.doubling div.ui")
40
+ ]
41
+
42
+ episodes_istek = await self.oturum.get(f"{self.main_url}/bolumler/{url.split('/')[-1]}")
43
+ episodes_secici = Selector(episodes_istek.text)
44
+ episodes = []
45
+
46
+ for sezon in episodes_secici.css("table.unstackable"):
47
+ for bolum in sezon.css("tbody tr"):
48
+ ep_name = bolum.css("td:nth-of-type(4) a::text").get(default="").strip()
49
+ ep_href = self.fix_url(bolum.css("td:nth-of-type(4) a::attr(href)").get())
50
+ ep_episode = bolum.css("td:nth-of-type(3) a::text").re_first(r"(\d+)")
51
+ ep_season = bolum.css("td:nth-of-type(2)::text").re_first(r"(\d+)")
52
+
53
+ if ep_name and ep_href:
54
+ episode = Episode(
55
+ season = ep_season,
56
+ episode = ep_episode,
57
+ title = ep_name,
58
+ url = ep_href,
59
+ )
60
+ episodes.append(episode)
61
+
62
+ return SeriesInfo(
63
+ url = url,
64
+ poster = poster,
65
+ title = title,
66
+ description = description,
67
+ tags = tags,
68
+ rating = rating,
69
+ year = year,
70
+ episodes = episodes,
71
+ actors = actors
72
+ )
73
+
74
+ async def load_links(self, url: str) -> list[str]:
75
+ istek = await self.oturum.get(url)
76
+ secici = Selector(istek.text)
77
+
78
+ bid = secici.css("div#dilsec::attr(data-id)").get()
79
+ if not bid:
80
+ return []
81
+
82
+ links = []
83
+ for dil, label in [("1", "AltYazı"), ("0", "Dublaj")]:
84
+ dil_istek = await self.oturum.post(
85
+ url = f"{self.main_url}/ajax/dataAlternatif2.asp",
86
+ headers = {"X-Requested-With": "XMLHttpRequest"},
87
+ data = {"bid": bid, "dil": dil},
88
+ )
89
+
90
+ try:
91
+ dil_json = dil_istek.json()
92
+ except Exception:
93
+ continue
94
+
95
+ if dil_json.get("status") == "success":
96
+ for veri in dil_json.get("data", []):
97
+ veri_response = await self.oturum.post(
98
+ url = f"{self.main_url}/ajax/dataEmbed.asp",
99
+ headers = {"X-Requested-With": "XMLHttpRequest"},
100
+ data = {"id": veri.get("id")},
101
+ )
102
+ secici = Selector(veri_response.text)
103
+
104
+ if iframe := secici.css("iframe::attr(src)").get():
105
+ video_url = self.fix_url(iframe)
106
+ links.append(video_url)
107
+
108
+ return links
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: KekikStream
3
- Version: 0.1.7
3
+ Version: 0.2.0
4
4
  Summary: terminal üzerinden medya içeriği aramanızı ve VLC/MPV gibi popüler medya oynatıcılar aracılığıyla doğrudan izlemenizi sağlayan modüler ve genişletilebilir bir bıdı bıdı
5
5
  Home-page: https://github.com/keyiflerolsun/KekikStream
6
6
  Author: keyiflerolsun
@@ -7,19 +7,20 @@ KekikStream/Core/ExtractorBase.py,sha256=SPXKZPfpzvgkJeMds-USzgpm8-qb0vgZjjLDs58
7
7
  KekikStream/Core/ExtractorLoader.py,sha256=JovJJr6Clk3xpbRLlh7v_XOl3FGwVXCjTZivec1FktI,2533
8
8
  KekikStream/Core/ExtractorModels.py,sha256=vJeh4qd05K7nbqdCCGU29UkGQpce6jXfsCm7LuDL1G8,454
9
9
  KekikStream/Core/MediaHandler.py,sha256=Q_9LMc4Wnmv8PhMfoo2IgxpHLeikUgrqp_B_Rfs217U,3005
10
- KekikStream/Core/PluginBase.py,sha256=CHq2ANsedSY1BQhGZgP4CumERRnOjiyopW3FMrE4J70,1474
10
+ KekikStream/Core/PluginBase.py,sha256=MmhGy0XtbkWxE5SNvsag0M_jNehMxPGtVyZFOKlJPM8,2304
11
11
  KekikStream/Core/PluginLoader.py,sha256=og5EPfnVqrb2kUkeGU65AY0fU43IbiUo_h3ix6ZiINY,2596
12
- KekikStream/Core/PluginModels.py,sha256=-V4Be9ebnUQsQtGzLxg0kGK13RJTmpB7bvAUwsE-ir0,2208
12
+ KekikStream/Core/PluginModels.py,sha256=WWPEz8PpZZ4bLMDJzTE19BsQEJObkyhaYjDkyLaF2Ck,2365
13
13
  KekikStream/Core/__init__.py,sha256=HZpXs3MKy4joO0sDpIGcZ2DrUKwK49IKG-GQgKbO2jk,416
14
14
  KekikStream/Extractors/CloseLoad.py,sha256=YmDB3YvuDaCUbQ0T_tmhnkEsC5mSdEN6GNoAR662fl8,990
15
15
  KekikStream/Extractors/MailRu.py,sha256=lB3Xy912EaSEUw7Im65L5TwtIeM7OLFV1_9lan39g40,1308
16
- KekikStream/Extractors/PixelDrain.py,sha256=ysHzc8-14sFkzfBheVzbM9HFyixDgVyPyn_l5LrGawQ,986
16
+ KekikStream/Extractors/PixelDrain.py,sha256=JLNaTdFJfXj5ExB_OjjyjwBZBD_gCOmL3fO_TWbHe90,998
17
17
  KekikStream/Extractors/RapidVid.py,sha256=HmSXDWhE1EXZRhNCxrqqEBbyJKbqFtTFRtq-zYg3G2c,2430
18
18
  KekikStream/Extractors/SibNet.py,sha256=w0Rv1cYB_Ho6M9Aho9n38Thp6mAfKPNe-eKFC_DbGuE,884
19
19
  KekikStream/Extractors/Sobreatsesuyp.py,sha256=7JUbqHLMWFkHuzH3NG2ogaV53e9fUmGvAr7h83yRtxs,1953
20
20
  KekikStream/Extractors/TRsTX.py,sha256=jhPcQq7KPxL0SPvEFL4MG7oDXDpBbt6Qh8vRJ_bLQMU,2105
21
21
  KekikStream/Extractors/TauVideo.py,sha256=bBjrZFSi4QqSJhRB0sDWMA0Saio-zpoAb6Ss4QZmBeY,1045
22
22
  KekikStream/Extractors/TurboImgz.py,sha256=0d9t6bj4prVt1_LIbzwcfuqrSRB7SMvc4RKvE25BtW4,851
23
+ KekikStream/Extractors/VidMoly.py,sha256=a2ElfpEcTWBpBT0mADWcEF2T8l9WjAEuX8Dux0hiYrU,3390
23
24
  KekikStream/Extractors/VidMoxy.py,sha256=UnVrCEI4XNiONE2aLV9dGUhRqQ9ELJTnYVXyG81N11A,1800
24
25
  KekikStream/Managers/ExtractorManager.py,sha256=9rGlUsnedJ7fwIeObN5Vsm8H5VLal0ODO7F93dDRx8w,976
25
26
  KekikStream/Managers/MediaManager.py,sha256=F7mkSvAttAaMHRvnDcxnV2K1D_sK644BCSrEaAmMl_U,522
@@ -28,11 +29,13 @@ KekikStream/Managers/UIManager.py,sha256=PmGabWjHACnaOZLyIfOd0j4cfqpuV34RO58QeeI
28
29
  KekikStream/Managers/__init__.py,sha256=3085I_9Sa2L_Vq6Z-QvYUYn1BapkN4sQqBo8ITZoD_4,251
29
30
  KekikStream/Plugins/FilmMakinesi.py,sha256=g4LRDP5Atn97PqbgnEdm0-wjVdXaJIVk1Ru0F8B66Ws,2902
30
31
  KekikStream/Plugins/FullHDFilmizlesene.py,sha256=HJzHDXHhhMpvXxiD2SjpoZEYs7dmnPymE8EXCSvLKVo,3106
32
+ KekikStream/Plugins/JetFilmizle.py,sha256=DPdvTEns8r2MI9pHY8d9EEsUZmlQU7N2C9yr8ox80qU,4016
33
+ KekikStream/Plugins/SezonlukDizi.py,sha256=VXpetJEGbeqN-EUpsEmKfb9g3E8H41nJU7BL0ESZjaw,4477
31
34
  KekikStream/Plugins/SineWix.py,sha256=RJxggTrZxBimQHI4ehtJipVeIBpfHy85NW-ixE2iF2k,4762
32
35
  KekikStream/Plugins/UgurFilm.py,sha256=U7ryNWpjSZJWuYlMGX1Be9uuyiM3SfuI9VJcEiXedNs,2960
33
- KekikStream-0.1.7.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
34
- KekikStream-0.1.7.dist-info/METADATA,sha256=_fm4Z7P5KXfua7j-QHksMSLjuP590efPALyTtCg9MjU,3961
35
- KekikStream-0.1.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
36
- KekikStream-0.1.7.dist-info/entry_points.txt,sha256=dFwdiTx8djyehI0Gsz-rZwjAfZzUzoBSrmzRu9ubjJc,50
37
- KekikStream-0.1.7.dist-info/top_level.txt,sha256=DNmGJDXl27Drdfobrak8KYLmocW_uznVYFJOzcjUgmY,12
38
- KekikStream-0.1.7.dist-info/RECORD,,
36
+ KekikStream-0.2.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
37
+ KekikStream-0.2.0.dist-info/METADATA,sha256=v8AgbIWWkDyGn-ip43bj7L0ykKI9W9FiOK4p33nZhYc,3961
38
+ KekikStream-0.2.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
39
+ KekikStream-0.2.0.dist-info/entry_points.txt,sha256=dFwdiTx8djyehI0Gsz-rZwjAfZzUzoBSrmzRu9ubjJc,50
40
+ KekikStream-0.2.0.dist-info/top_level.txt,sha256=DNmGJDXl27Drdfobrak8KYLmocW_uznVYFJOzcjUgmY,12
41
+ KekikStream-0.2.0.dist-info/RECORD,,