KekikStream 0.1.7__py3-none-any.whl → 0.1.8__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
@@ -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,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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: KekikStream
3
- Version: 0.1.7
3
+ Version: 0.1.8
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,13 +7,13 @@ 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
12
  KekikStream/Core/PluginModels.py,sha256=-V4Be9ebnUQsQtGzLxg0kGK13RJTmpB7bvAUwsE-ir0,2208
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
@@ -28,11 +28,12 @@ KekikStream/Managers/UIManager.py,sha256=PmGabWjHACnaOZLyIfOd0j4cfqpuV34RO58QeeI
28
28
  KekikStream/Managers/__init__.py,sha256=3085I_9Sa2L_Vq6Z-QvYUYn1BapkN4sQqBo8ITZoD_4,251
29
29
  KekikStream/Plugins/FilmMakinesi.py,sha256=g4LRDP5Atn97PqbgnEdm0-wjVdXaJIVk1Ru0F8B66Ws,2902
30
30
  KekikStream/Plugins/FullHDFilmizlesene.py,sha256=HJzHDXHhhMpvXxiD2SjpoZEYs7dmnPymE8EXCSvLKVo,3106
31
+ KekikStream/Plugins/JetFilmizle.py,sha256=DPdvTEns8r2MI9pHY8d9EEsUZmlQU7N2C9yr8ox80qU,4016
31
32
  KekikStream/Plugins/SineWix.py,sha256=RJxggTrZxBimQHI4ehtJipVeIBpfHy85NW-ixE2iF2k,4762
32
33
  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,,
34
+ KekikStream-0.1.8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
35
+ KekikStream-0.1.8.dist-info/METADATA,sha256=x9zouqWIPAlgPfpKwsqczRyIbquHJG6wM3ybNRqEgV8,3961
36
+ KekikStream-0.1.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
37
+ KekikStream-0.1.8.dist-info/entry_points.txt,sha256=dFwdiTx8djyehI0Gsz-rZwjAfZzUzoBSrmzRu9ubjJc,50
38
+ KekikStream-0.1.8.dist-info/top_level.txt,sha256=DNmGJDXl27Drdfobrak8KYLmocW_uznVYFJOzcjUgmY,12
39
+ KekikStream-0.1.8.dist-info/RECORD,,