migliorie piratestreaming e tantifilm

This commit is contained in:
marco
2020-05-01 23:51:55 +02:00
parent e4a482e51d
commit cdf84d5573
2 changed files with 8 additions and 12 deletions

View File

@@ -67,14 +67,12 @@ def newest(categoria):
@support.scrape
def peliculas(item):
patron = r'data-placement="bottom" title="(?P<title>[^"]+)" alt=[^=]+="(?P<url>[^"]+)"> <img class="[^"]+" title="[^"]+" alt="[^"]+" src="(?P<thumb>[^"]+)"'
patron = r'data-placement="bottom" title="(?P<title>[^"]+)" alt=[^=]+="(?P<url>[^"]+)"> <img class="[^"]+" title="[^"]+(?P<type>film|serie)[^"]+" alt="[^"]+" src="(?P<thumb>[^"]+)"'
patronNext = r'<a\s*class="nextpostslink" rel="next" href="([^"]+)">Avanti'
def itemHook(item):
item.thumbnail = item.thumbnail.replace('locandina-film-small','locandina-film-big')
if 'serie' in item.url:
item.contentType = 'tvshow'
item.action = 'episodios'
return item
typeActionDict = {'findvideos': ['film'], 'episodios': ['serie']}
typeContentDict = {'movie': ['film'], 'tvshow': ['serie']}
# debug = True
return locals()
@@ -83,7 +81,7 @@ def episodios(item):
if item.data: data = item.data
# debug= True
title = item.fulltitle
patron = r'link-episode">(?:\s*<strong>)?\s*(?P<episode>\d+.\d+(?:.\d+)?)(?:[^\(]+\((?P<lang>[?P<lang>A-Za-z-]+)[^>]+>)?(?:\s*(?P<title>.*?) )[^>]+<\/span>\s*(?P<url>.*?)</div>'
patron = r'link-episode">(?:\s*<strong>)?\s*(?P<episode>\d+.\d+(?:.\d+)?)(?:\s*\((?P<lang>[?P<lang>A-Za-z-]+)[^>]+>)?(?:\s*(?P<title>.*?) )[^>]+<\/span>\s*(?P<url>.*?)</div>'
def itemHook(item):
if 'Episodio' in item.title:
item.title = support.re.sub(r'Episodio [0-9.-]+', title, item.title)

View File

@@ -5,13 +5,11 @@
import re
from core import scrapertools, httptools, tmdb, support
from core import scrapertools, httptools, support
from core.item import Item
from core.support import log
from platformcode import logger
from specials import autorenumber
from platformcode import config, unify
from lib.unshortenit import unshorten_only
def findhost():
@@ -79,7 +77,7 @@ def episodios(item):
data_check = re.sub(r'>\s+<', '> <', data_check)
else:
data_check = item.data
patron_check = r'<iframe src="([^"]+)" scrolling="no" frameborder="0" width="626" height="550" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">'
patron_check = r'<iframe src="([^"]+)"'
data = httptools.downloadpage(scrapertools.find_single_match(data_check, patron_check), headers=headers).data
data = data.replace("'", '"')
data = re.sub('\n|\t', ' ', data)