Skip to content

Commit

Permalink
bt4g: new channel
Browse files Browse the repository at this point in the history
  • Loading branch information
ilmich committed Dec 28, 2024
1 parent c6bc10c commit daa7002
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions channels.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"animeunity": "https://www.animeunity.tv",
"animeworld": "https://www.animeworld.so",
"aniplay": "https://aniplay.co",
"bt4g": "https://bt4gprx.com",
"casacinema": "https://casacinema.im",
"cb01anime": "https://cb01new.one",
"cinemalibero": "https://cinemalibero.cafe",
Expand Down
11 changes: 11 additions & 0 deletions channels/bt4g.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"id": "bt4g",
"name": "BT4G",
"active": true,
"language": ["ita"],
"thumbnail": "bt4g.png",
"banner": "bt4g.png",
"categories": ["movie", "tvshow", "torrent"],
"not_active": ["include_in_newest"],
"settings": []
}
59 changes: 59 additions & 0 deletions channels/bt4g.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Canale per ilcorsaronero
# ------------------------------------------------------------

from core import support, httptools

host = support.config.get_channel_url()
headers = [['Referer', host]]

@support.menu
def mainlist(item):

search = ''
return locals()

@support.scrape
def peliculas(item):
debug = False
action = 'findvideos'
sceneTitle = True

def itemHook(item):
item.title = support.scrapertools.decodeHtmlentities(support.urlparse.unquote(item.title))

return item

if not item.nextpage:
item.page = 1
else:
item.page = item.nextpage

if not item.parent_url:
item.parent_url = item.url

item.nextpage = item.page + 1
nextPageUrl = "{}/search?{}".format(host, support.urlencode({'q': item.args,'category': 'movie', 'page': 'rss', 'orderby' : 'seeders', 'p' : item.nextpage}))
resp = httptools.downloadpage(nextPageUrl)
if ('item' not in resp.data.lower()): # no more elements
nextPageUrl = ''

patron = r'<item>.*?<title>(?P<title>.*?)</title><link>(?P<url>.*?)</link>'
return locals()

def search(item, text):
item.url = "{}/search?{}".format(host, support.urlencode({'q': text,'category': 'movie', 'page': 'rss', 'orderby' : 'seeders'}))
item.args = text

try:
return peliculas(item)

except:
import sys
for line in sys.exc_info():
logger.error("search except: %s" % line)
return []

def findvideos(item):
return support.server(item, item.url)

0 comments on commit daa7002

Please sign in to comment.