Fix fon support and ilgeniodellostreaming
This commit is contained in:
@@ -40,10 +40,18 @@ def newest(categoria):
|
||||
log(categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
try:
|
||||
if categoria == "movie": item.url = host + '/film/'
|
||||
elif categoria == "tvshow": item.url = host + '/serie/'
|
||||
elif categoria == "anime": item.url = host + '/anime/'
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/film/'
|
||||
elif categoria == "series":
|
||||
item.contentType = 'episode'
|
||||
item.url = host + '/serie/'
|
||||
elif categoria == "anime":
|
||||
item.contentType = 'episode'
|
||||
item.url = host + '/anime/'
|
||||
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
@@ -126,10 +134,11 @@ def episodios(item):
|
||||
|
||||
def findvideos(item):
|
||||
log()
|
||||
itemlist =[]
|
||||
matches, data = support.match(item, '<iframe class="metaframe rptss" src="([^"]+)"[^>]+>',headers=headers)
|
||||
for url in matches:
|
||||
html = httptools.downloadpage(url, headers=headers).data
|
||||
data += str(scrapertoolsV2.find_multiple_matches(html, '<meta name="og:url" content="([^"]+)">'))
|
||||
|
||||
return support.server(item, data)
|
||||
itemlist = support.server(item, data)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ def color(text, color):
|
||||
|
||||
|
||||
def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data="", patron_block="",
|
||||
patronNext="", action="findvideos", addVideolibrary = True):
|
||||
patronNext="", action="findvideos", addVideolibrary = True, type_content_dict={}, type_action_dict={}):
|
||||
# patron: the patron to use for scraping page, all capturing group must match with listGroups
|
||||
# listGroups: a list containing the scraping info obtained by your patron, in order
|
||||
# accepted values are: url, title, thumb, quality, year, plot, duration, genre, rating
|
||||
@@ -114,6 +114,9 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
|
||||
# blacklist = 'Request a TV serie!'
|
||||
# return support.scrape(item, itemlist, patron, ['thumb', 'quality', 'url', 'title', 'year', 'plot'],
|
||||
# headers=headers, blacklist=blacklist)
|
||||
# 'type' is a check for typologies of content e.g. Film or TV Series
|
||||
# 'episode' is a key to grab episode numbers if it is separated from the title
|
||||
# IMPORTANT 'type' is a special key, to work need type_content_dict={} and type_action_dict={}
|
||||
|
||||
itemlist = []
|
||||
|
||||
@@ -187,6 +190,15 @@ def scrape(item, patron = '', listGroups = [], headers="", blacklist="", data=""
|
||||
if scraped["rating"]:
|
||||
infolabels['rating'] = scrapertoolsV2.decodeHtmlentities(scraped["rating"])
|
||||
|
||||
if type_content_dict:
|
||||
for name, variants in type_content_dict.items():
|
||||
if scraped['type'] in variants:
|
||||
item.contentType = name
|
||||
if type_action_dict:
|
||||
for name, variants in type_action_dict.items():
|
||||
if scraped['type'] in variants:
|
||||
action = name
|
||||
|
||||
if scraped["title"] not in blacklist:
|
||||
it = Item(
|
||||
channel=item.channel,
|
||||
|
||||
Reference in New Issue
Block a user