migliorie piratestreaming e tantifilm

This commit is contained in:
marco
2020-05-01 23:51:55 +02:00
parent 7374c9639e
commit ac86c3fcfe
2 changed files with 8 additions and 12 deletions
+6 -8
View File
@@ -67,14 +67,12 @@ def newest(categoria):
@support.scrape @support.scrape
def peliculas(item): 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' patronNext = r'<a\s*class="nextpostslink" rel="next" href="([^"]+)">Avanti'
def itemHook(item):
item.thumbnail = item.thumbnail.replace('locandina-film-small','locandina-film-big') typeActionDict = {'findvideos': ['film'], 'episodios': ['serie']}
if 'serie' in item.url: typeContentDict = {'movie': ['film'], 'tvshow': ['serie']}
item.contentType = 'tvshow' # debug = True
item.action = 'episodios'
return item
return locals() return locals()
@@ -83,7 +81,7 @@ def episodios(item):
if item.data: data = item.data if item.data: data = item.data
# debug= True # debug= True
title = item.fulltitle 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): def itemHook(item):
if 'Episodio' in item.title: if 'Episodio' in item.title:
item.title = support.re.sub(r'Episodio [0-9.-]+', title, item.title) item.title = support.re.sub(r'Episodio [0-9.-]+', title, item.title)
+2 -4
View File
@@ -5,13 +5,11 @@
import re import re
from core import scrapertools, httptools, tmdb, support from core import scrapertools, httptools, support
from core.item import Item from core.item import Item
from core.support import log from core.support import log
from platformcode import logger from platformcode import logger
from specials import autorenumber
from platformcode import config, unify from platformcode import config, unify
from lib.unshortenit import unshorten_only
def findhost(): def findhost():
@@ -79,7 +77,7 @@ def episodios(item):
data_check = re.sub(r'>\s+<', '> <', data_check) data_check = re.sub(r'>\s+<', '> <', data_check)
else: else:
data_check = item.data 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 = httptools.downloadpage(scrapertools.find_single_match(data_check, patron_check), headers=headers).data
data = data.replace("'", '"') data = data.replace("'", '"')
data = re.sub('\n|\t', ' ', data) data = re.sub('\n|\t', ' ', data)