KekikStream 0.3.8__py3-none-any.whl → 0.4.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.
@@ -15,7 +15,7 @@ class ContentX(ExtractorBase):
15
15
  istek.raise_for_status()
16
16
  i_source = istek.text
17
17
 
18
- i_extract = re.search(r"window\.openPlayer\('([^']+)'\)", i_source)
18
+ i_extract = re.search(r"window\.openPlayer\('([^']+)'", i_source)
19
19
  if not i_extract:
20
20
  raise ValueError("i_extract is null")
21
21
  i_extract_value = i_extract[1]
@@ -77,4 +77,4 @@ class ContentX(ExtractorBase):
77
77
  )
78
78
  )
79
79
 
80
- return results
80
+ return results[0] if len(results) == 1 else results
@@ -56,4 +56,4 @@ class Sobreatsesuyp(ExtractorBase):
56
56
  if not all_results:
57
57
  raise ValueError("No videos found in response.")
58
58
 
59
- return all_results
59
+ return all_results[0] if len(all_results) == 1 else all_results
@@ -64,4 +64,4 @@ class TRsTX(ExtractorBase):
64
64
  if not all_results:
65
65
  raise ValueError("No videos found in response.")
66
66
 
67
- return all_results
67
+ return all_results[0] if len(all_results) == 1 else all_results
@@ -21,12 +21,14 @@ class TauVideo(ExtractorBase):
21
21
  if "urls" not in api_data:
22
22
  raise ValueError("API yanıtında 'urls' bulunamadı.")
23
23
 
24
- return [
25
- ExtractResult(
26
- name = f"{self.name} - {video['label']}",
27
- url = video["url"],
28
- referer = referer or self.main_url,
29
- subtitles = []
30
- )
31
- for video in api_data["urls"]
32
- ]
24
+ results = [
25
+ ExtractResult(
26
+ name = f"{self.name} - {video['label']}",
27
+ url = video["url"],
28
+ referer = referer or self.main_url,
29
+ subtitles = []
30
+ )
31
+ for video in api_data["urls"]
32
+ ]
33
+
34
+ return results[0] if len(results) == 1 else results
@@ -0,0 +1,95 @@
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
+ from json import loads
6
+
7
+ class Dizilla(PluginBase):
8
+ name = "Dizilla"
9
+ main_url = "https://dizilla.club"
10
+
11
+ async def search(self, query: str) -> list[SearchResult]:
12
+ ilk_istek = await self.oturum.get(self.main_url)
13
+ ilk_secici = Selector(ilk_istek.text)
14
+ cKey = ilk_secici.css("input[name='cKey']::attr(value)").get()
15
+ cValue = ilk_secici.css("input[name='cValue']::attr(value)").get()
16
+
17
+ self.oturum.headers.update({
18
+ "Accept" : "application/json, text/javascript, */*; q=0.01",
19
+ "X-Requested-With" : "XMLHttpRequest",
20
+ "Referer" : f"{self.main_url}/"
21
+ })
22
+ self.oturum.cookies.update({
23
+ "showAllDaFull" : "true",
24
+ "PHPSESSID" : ilk_istek.cookies.get("PHPSESSID"),
25
+ })
26
+
27
+ arama_istek = await self.oturum.post(
28
+ url = f"{self.main_url}/bg/searchcontent",
29
+ data = {
30
+ "cKey" : cKey,
31
+ "cValue" : cValue,
32
+ "searchterm" : query
33
+ }
34
+ )
35
+ arama_veri = arama_istek.json().get("data", {}).get("result", [])
36
+
37
+ return [
38
+ SearchResult(
39
+ title = veri.get("object_name"),
40
+ url = self.fix_url(f"{self.main_url}/{veri.get('used_slug')}"),
41
+ poster = self.fix_url(veri.get("object_poster_url")),
42
+ )
43
+ for veri in arama_veri
44
+ ]
45
+
46
+ async def load_item(self, url: str) -> SeriesInfo:
47
+ istek = await self.oturum.get(url)
48
+ secici = Selector(istek.text)
49
+ veri = loads(secici.xpath("//script[@type='application/ld+json']/text()").getall()[-1])
50
+
51
+ title = veri.get("name")
52
+ if alt_title := veri.get("alternateName"):
53
+ title += f" - ({alt_title})"
54
+
55
+ poster = self.fix_url(veri.get("image"))
56
+ description = veri.get("description")
57
+ year = veri.get("datePublished").split("-")[0]
58
+ tags = []
59
+ rating = veri.get("aggregateRating", {}).get("ratingValue")
60
+ actors = [actor.get("name") for actor in veri.get("actor", []) if actor.get("name")]
61
+
62
+ bolumler = []
63
+ sezonlar = veri.get("containsSeason") if isinstance(veri.get("containsSeason"), list) else [veri.get("containsSeason")]
64
+ for sezon in sezonlar:
65
+ for bolum in sezon.get("episode"):
66
+ bolumler.append(Episode(
67
+ season = sezon.get("seasonNumber"),
68
+ episode = bolum.get("episodeNumber"),
69
+ title = bolum.get("name"),
70
+ url = bolum.get("url"),
71
+ ))
72
+
73
+ return SeriesInfo(
74
+ url = url,
75
+ poster = poster,
76
+ title = title,
77
+ description = description,
78
+ tags = tags,
79
+ rating = rating,
80
+ year = year,
81
+ episodes = bolumler,
82
+ actors = actors
83
+ )
84
+
85
+ async def load_links(self, url: str) -> list[str]:
86
+ istek = await self.oturum.get(url)
87
+ secici = Selector(istek.text)
88
+
89
+ iframes = [self.fix_url(secici.css("div#playerLsDizilla iframe::attr(src)").get())]
90
+ for alternatif in secici.css("a[href*='player']"):
91
+ alt_istek = await self.oturum.get(self.fix_url(alternatif.css("::attr(href)").get()))
92
+ alt_secici = Selector(alt_istek.text)
93
+ iframes.append(self.fix_url(alt_secici.css("div#playerLsDizilla iframe::attr(src)").get()))
94
+
95
+ return iframes
KekikStream/__init__.py CHANGED
@@ -84,9 +84,7 @@ class KekikStream:
84
84
  secilen_sonuc = await self.tum_sonuc_secimi(sonuclar)
85
85
 
86
86
  if secilen_sonuc:
87
- for _ in range(3):
88
- with suppress(Exception):
89
- return await self.sonuc_detaylari_goster(secilen_sonuc)
87
+ return await self.sonuc_detaylari_goster(secilen_sonuc)
90
88
 
91
89
  async def tum_eklentilerde_arama_sorgula(self, sorgu: str) -> list:
92
90
  tum_sonuclar = []
@@ -134,7 +132,15 @@ class KekikStream:
134
132
  else:
135
133
  url = secilen_sonuc
136
134
 
137
- medya_bilgi = await self.suanki_eklenti.load_item(url)
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
+
138
144
  except Exception as hata:
139
145
  konsol.log(secilen_sonuc)
140
146
  return hata_yakala(hata)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: KekikStream
3
- Version: 0.3.8
3
+ Version: 0.4.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
@@ -1,4 +1,4 @@
1
- KekikStream/__init__.py,sha256=8sSiunt3dOsmNLfNkkp06y74ogKxV03Y59NM-mdPn04,10613
1
+ KekikStream/__init__.py,sha256=18tJQJjoRtYO_nUVLylJRPQ_zctn7VdUF-O67zty-kc,10849
2
2
  KekikStream/__main__.py,sha256=B81dQoeGEb-T5Sycs3eNAmW7unvx0Mef0syCjs4nPds,137
3
3
  KekikStream/requirements.txt,sha256=gS_TUUQx5A7FUmRGxj2dQedxheD7qA6AswdUb2y_Ub8,70
4
4
  KekikStream/CLI/__init__.py,sha256=U6oLq_O7u5y2eHhBnmfhZNns_EqHHJXJmzl8jvZFUNY,230
@@ -12,7 +12,7 @@ KekikStream/Core/PluginLoader.py,sha256=5HQF8Em1TjvqMBPLKB7M_i2y6zPH6JZao-uekeac
12
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
- KekikStream/Extractors/ContentX.py,sha256=0u2Tz80q_k6deLb9t4Q8uYabj_uWFfFftRnbpRL84dU,2945
15
+ KekikStream/Extractors/ContentX.py,sha256=XPoAuA95LOTgCUGyioXxOFWR0nNKWWOHLkYMlzguIIE,2980
16
16
  KekikStream/Extractors/FourCX.py,sha256=4FrMj1IZBBpN_g1P6S3A-8eUu7QFwlt4fJXzJ7vfe0Q,221
17
17
  KekikStream/Extractors/FourPichive.py,sha256=iq3BCUbih1UVF4y4BIWO--0hX5jP2nxqesNx3MGP3kQ,234
18
18
  KekikStream/Extractors/FourPlayRu.py,sha256=wq1ylxKpsO_IBoYr_ALzB2dVrQpJ-jY9lf2zPhcAZX8,228
@@ -29,9 +29,9 @@ KekikStream/Extractors/PixelDrain.py,sha256=1kf1kKKxcYwLVPo_8Fg1Za3E2kOplqqVFM41
29
29
  KekikStream/Extractors/PlayRu.py,sha256=DQMZyCSJwLkrh-gfDD8T1DvUFNBAKUXpByeCAWuK6YY,215
30
30
  KekikStream/Extractors/RapidVid.py,sha256=n03CyrnFLSoL6Ys5Dy4a4d-5iIAdmouqz4-k6Vl3Hok,2369
31
31
  KekikStream/Extractors/SibNet.py,sha256=Jrl93OdKwEhssG348-F2BKaj-XUS7v-Qw3dKMh_ZMRQ,878
32
- KekikStream/Extractors/Sobreatsesuyp.py,sha256=mBYu29rHpAZfB8CYJ6Wuy3roUvdRyqzkfAxmEUkkaxw,1959
33
- KekikStream/Extractors/TRsTX.py,sha256=ammizq5izjv9FpeV5kyXZPftEX_K0JGQfAnlMhl2Sn0,2111
34
- KekikStream/Extractors/TauVideo.py,sha256=ID-QwdPnl62wTECSzTFA8Z0P7Rv9LELd6xdvBz5ALiQ,1018
32
+ KekikStream/Extractors/Sobreatsesuyp.py,sha256=p5aHxIM9aNBfWEnqjTdI_kYpcFKvBHg1BZoPqbB_eyo,2004
33
+ KekikStream/Extractors/TRsTX.py,sha256=Z-Xk6kSAFFbxnj2I7x0gAbBbaQyuj1mIqn2Sw0xFtP4,2156
34
+ KekikStream/Extractors/TauVideo.py,sha256=I6TYHqAYSb_fAIcb8PiIdkzlQ0ZX-9Bb5_KMG955sJ4,1114
35
35
  KekikStream/Extractors/TurboImgz.py,sha256=VXx9vZZRTdQiVNER0LcXm2nsv2OaXnxuPpslG-sEKD0,826
36
36
  KekikStream/Extractors/VidMoly.py,sha256=BKJgk60GomFYiLFsRQSR2sOYP105Aix5y5XLazBNWmw,3368
37
37
  KekikStream/Extractors/VidMoxy.py,sha256=_K6BA7Uo59DA3ty_tsayCUZjXmRoDBTghekVNXiuZ7g,1800
@@ -42,15 +42,16 @@ KekikStream/Managers/PluginManager.py,sha256=YDBLHB_Fh79A3Pei0ny2KLVY4VSihdNiKBh
42
42
  KekikStream/Managers/UIManager.py,sha256=OrGxzbhRPTCqiLEXjipLb8ChF7saV3fvFIUXLKT9w6Q,1612
43
43
  KekikStream/Managers/__init__.py,sha256=3085I_9Sa2L_Vq6Z-QvYUYn1BapkN4sQqBo8ITZoD_4,251
44
44
  KekikStream/Plugins/DiziBox.py,sha256=ARzsao-r91c3PVV_3-NCLvNcVRSIxjlGdWl_3-1Q6Mo,5722
45
+ KekikStream/Plugins/Dizilla.py,sha256=D-gQ23rck3UjnYeYSYzokYWVL7lshzEk4vS3qsR_7Tk,3813
45
46
  KekikStream/Plugins/FilmMakinesi.py,sha256=rz8TQeL41PJbeEmksgPHIhp6J-4vbSCBTeEH0ukExz4,2822
46
47
  KekikStream/Plugins/FullHDFilmizlesene.py,sha256=Fa0gRP_NoMfPC8HIKRxERjQVOv8Fyb-ayMJ2EooZ7BE,3080
47
48
  KekikStream/Plugins/JetFilmizle.py,sha256=FXkMSQtjYoxwIonjRENFa91rC42L_8SYRhjhuSgsu60,3919
48
49
  KekikStream/Plugins/SezonlukDizi.py,sha256=5BZVzQ2eQtymHxO0bzjA2ho4FFNahPFQly4hoHuH8lo,4441
49
50
  KekikStream/Plugins/SineWix.py,sha256=ZtcIwPW0ONGkSjT7Ye8b71RWdHZMUZefX-JTWu6uGSs,4854
50
51
  KekikStream/Plugins/UgurFilm.py,sha256=yYXee5uxwNnPqFJZ6s6cRkmUyqS3Vv8x-iesPalc4j4,2930
51
- KekikStream-0.3.8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
52
- KekikStream-0.3.8.dist-info/METADATA,sha256=bnFaZhNtzr4FZX37i-4CxN4kbom-meinCuh_g7apaSw,3987
53
- KekikStream-0.3.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
54
- KekikStream-0.3.8.dist-info/entry_points.txt,sha256=dFwdiTx8djyehI0Gsz-rZwjAfZzUzoBSrmzRu9ubjJc,50
55
- KekikStream-0.3.8.dist-info/top_level.txt,sha256=DNmGJDXl27Drdfobrak8KYLmocW_uznVYFJOzcjUgmY,12
56
- KekikStream-0.3.8.dist-info/RECORD,,
52
+ KekikStream-0.4.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
53
+ KekikStream-0.4.0.dist-info/METADATA,sha256=fUBCvWMBfrjsbco8EHLAtMEOeJmjN5HQNnZn3HMNoj0,3987
54
+ KekikStream-0.4.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
55
+ KekikStream-0.4.0.dist-info/entry_points.txt,sha256=dFwdiTx8djyehI0Gsz-rZwjAfZzUzoBSrmzRu9ubjJc,50
56
+ KekikStream-0.4.0.dist-info/top_level.txt,sha256=DNmGJDXl27Drdfobrak8KYLmocW_uznVYFJOzcjUgmY,12
57
+ KekikStream-0.4.0.dist-info/RECORD,,