11# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır.
22
3- from KekikStream .Core import kekik_cache , PluginBase , SearchResult , MovieInfo , Episode , SeriesInfo , ExtractResult , Subtitle
3+ from KekikStream .Core import kekik_cache , PluginBase , MainPageResult , SearchResult , MovieInfo , Episode , SeriesInfo , ExtractResult , Subtitle
44from httpx import AsyncClient
55from json import dumps , loads
66import re
77
88class RecTV (PluginBase ):
9- name = "RecTV"
10- main_url = "https://a.prectv35.sbs"
9+ name = "RecTV"
10+ language = "tr"
11+ main_url = "https://a.prectv35.sbs"
12+ favicon = f"https://www.google.com/s2/favicons?domain={ main_url } &sz=64"
13+ description = "RecTv APK, Türkiye’deki en popüler Çevrimiçi Medya Akış platformlarından biridir. Filmlerin, Canlı Sporların, Web Dizilerinin ve çok daha fazlasının keyfini ücretsiz çıkarın."
1114
1215 sw_key = "4F5A9C3D9A86FA54EACEDDD635185/c3c5bd17-e37b-4b94-a944-8a3688a30452"
1316 http2 = AsyncClient (http2 = True )
1417 http2 .headers .update ({"user-agent" : "okhttp/4.12.0" })
1518
16- kekik_cache (ttl = 60 * 60 )
19+ main_page = {
20+ f"{ main_url } /api/channel/by/filtres/0/0/SAYFA/{ sw_key } /" : "Canlı" ,
21+ f"{ main_url } /api/movie/by/filtres/0/created/SAYFA/{ sw_key } /" : "Son Filmler" ,
22+ f"{ main_url } /api/serie/by/filtres/0/created/SAYFA/{ sw_key } /" : "Son Diziler" ,
23+ f"{ main_url } /api/movie/by/filtres/14/created/SAYFA/{ sw_key } /" : "Aile" ,
24+ f"{ main_url } /api/movie/by/filtres/1/created/SAYFA/{ sw_key } /" : "Aksiyon" ,
25+ f"{ main_url } /api/movie/by/filtres/13/created/SAYFA/{ sw_key } /" : "Animasyon" ,
26+ f"{ main_url } /api/movie/by/filtres/19/created/SAYFA/{ sw_key } /" : "Belgesel" ,
27+ f"{ main_url } /api/movie/by/filtres/4/created/SAYFA/{ sw_key } /" : "Bilim Kurgu" ,
28+ f"{ main_url } /api/movie/by/filtres/2/created/SAYFA/{ sw_key } /" : "Dram" ,
29+ f"{ main_url } /api/movie/by/filtres/10/created/SAYFA/{ sw_key } /" : "Fantastik" ,
30+ f"{ main_url } /api/movie/by/filtres/3/created/SAYFA/{ sw_key } /" : "Komedi" ,
31+ f"{ main_url } /api/movie/by/filtres/8/created/SAYFA/{ sw_key } /" : "Korku" ,
32+ f"{ main_url } /api/movie/by/filtres/17/created/SAYFA/{ sw_key } /" : "Macera" ,
33+ f"{ main_url } /api/movie/by/filtres/5/created/SAYFA/{ sw_key } /" : "Romantik"
34+ }
35+
36+ @kekik_cache (ttl = 60 * 60 )
37+ async def get_main_page (self , page : int , url : str , category : str ) -> list [MainPageResult ]:
38+ istek = await self .httpx .get (f"{ url .replace ('SAYFA' , str (int (page ) - 1 ))} " )
39+ veriler = istek .json ()
40+
41+ return [
42+ MainPageResult (
43+ category = category ,
44+ title = self .clean_title (veri .get ("title" )),
45+ url = dumps (veri ),
46+ poster = self .fix_url (veri .get ("image" )),
47+ )
48+ for veri in veriler
49+ ]
50+
51+ @kekik_cache (ttl = 60 * 60 )
1752 async def search (self , query : str ) -> list [SearchResult ]:
1853 self .media_handler .headers .update ({"User-Agent" : "googleusercontent" })
1954
@@ -35,7 +70,7 @@ async def search(self, query: str) -> list[SearchResult]:
3570 for veri in tum_veri
3671 ]
3772
38- kekik_cache (ttl = 60 * 60 )
73+ @ kekik_cache (ttl = 60 * 60 )
3974 async def load_item (self , url : str ) -> MovieInfo :
4075 veri = loads (url )
4176
@@ -86,7 +121,7 @@ async def load_item(self, url: str) -> MovieInfo:
86121 actors = []
87122 )
88123
89- kekik_cache (ttl = 15 * 60 )
124+ @ kekik_cache (ttl = 15 * 60 )
90125 async def load_links (self , url : str ) -> list [str ]:
91126 try :
92127 veri = loads (url )
0 commit comments