forked from lozioangie/addon
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |