Fix Film per Tutti
This commit is contained in:
@@ -2,19 +2,7 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per filmpertutti.py
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
Questi sono commenti per i beta-tester.
|
||||
|
||||
Su questo canale, nella categoria 'Ricerca Globale'
|
||||
non saranno presenti le voci 'Aggiungi alla Videoteca'
|
||||
e 'Scarica Film'/'Scarica Serie', dunque,
|
||||
la loro assenza, nel Test, NON dovrà essere segnalata come ERRORE.
|
||||
|
||||
Novità (globale). Indicare in quale/i sezione/i è presente il canale:
|
||||
- film, serie
|
||||
- I titoli in questa sezione a gruppi di 20
|
||||
|
||||
"""
|
||||
import re
|
||||
|
||||
from core import scrapertools, httptools, support
|
||||
@@ -24,7 +12,7 @@ from platformcode import config
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
list_servers = ['speedvideo', 'verystream', 'openload', 'streamango', 'wstream', 'akvideo']
|
||||
list_servers = ['mixdrop', 'akvideo', 'wstream', 'onlystream', 'speedvideo']
|
||||
list_quality = ['HD', 'SD']
|
||||
|
||||
@support.menu
|
||||
@@ -74,16 +62,11 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
support.log('SERIES DATA= ',data)
|
||||
data = support.match(item.url, headers=headers).data
|
||||
if 'accordion-item' in data:
|
||||
patronBlock = r'<span class="season[^>]*>\d+[^>]+>[^>]+>[^>]+>[^>]+>\D*(?:STAGIONE|Stagione)[ -]+(?P<lang>[a-zA-Z\- ]+)[^<]*</span>(?P<block>.*?)<div id="(?:season|disqus)'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)">.*?<li class="season-no">(?P<episode>[^<]+)<\/li>(?P<url>.*?javascript:;">)(?P<title>[^<]+)'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)">.*?<li class="season-no">(?P<episode>[^<]+)<\/li>(?P<url>.*?javascript:;">(?P<title>[^<]+).*?</tbody>)'
|
||||
else:
|
||||
# patronBlock = r'<div id="info" class="pad">(?P<block>.*?)<div id="disqus_thread">'
|
||||
# deflang='Sub-ITA'
|
||||
patronBlock = r'(?:STAGIONE|Stagione)(?:<[^>]+>)?\s*(?:(?P<lang>[A-Za-z- ]+))?(?P<block>.*?)(?: |<strong>|<div class="addtoany)'
|
||||
patron = r'(?:/>|p>)\s*(?P<season>\d+)(?:×|×|x)(?P<episode>\d+)[^<]+(?P<url>.*?)(?:<br|</p)'
|
||||
def itemHook(item):
|
||||
@@ -104,17 +87,16 @@ def genres(item):
|
||||
|
||||
action = 'peliculas'
|
||||
patronBlock = r'<select class="cats">(?P<block>.*?)<\/select>'
|
||||
patronMenu = r'<option data-src="(?P<url>[^"]+)">(?P<title>.*?)<\/option>'
|
||||
patronMenu = r'<option data-src="(?P<url>[^"]+)">(?P<title>[^<]+)<\/option>'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def select(item):
|
||||
support.log()
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
patronBlock = scrapertools.find_single_match(data, r'class="taxonomy category" ><span property="name">(.*?)</span></a><meta property="position" content="2">')
|
||||
if patronBlock.lower() != 'film':
|
||||
patron=r'class="taxonomy category" ><span property="name">([^>]+)</span></a><meta property="position" content="2">'
|
||||
block = support.match(item.url, patron=patron,headers=headers).match
|
||||
if block.lower() != 'film':
|
||||
support.log('select = ### è una serie ###')
|
||||
item.contentType='tvshow'
|
||||
return episodios(item)
|
||||
|
||||
@@ -37,7 +37,7 @@ class UnshortenIt(object):
|
||||
_rapidcrypt_regex = r'rapidcrypt\.net'
|
||||
_cryptmango_regex = r'cryptmango|xshield\.net'
|
||||
_vcrypt_regex = r'vcrypt\.net'
|
||||
_linkup_regex = r'linkup\.pro'
|
||||
_linkup_regex = r'linkup\.pro|buckler.link'
|
||||
|
||||
_maxretries = 5
|
||||
|
||||
|
||||
@@ -20,11 +20,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
patronvideos = [
|
||||
r'(https?://(gestyy|rapidteria|sprysphere)\.com/[a-zA-Z0-9]+)',
|
||||
r'(https?://(?:www\.)?(vcrypt|linkup)\.[^/]+/[^/]+/[a-zA-Z0-9_]+)',
|
||||
r'(https?://(?:www\.)?(bit)\.ly/[a-zA-Z0-9]+)',
|
||||
r'(https?://(?:www\.)?(bit|buckler)\.[^/]+/[a-zA-Z0-9]+)',
|
||||
r'(https?://(?:www\.)?(xshield)\.[^/]+/[^/]+/[^/]+/[a-zA-Z0-9_\.]+)'
|
||||
]
|
||||
|
||||
for patron in patronvideos:
|
||||
# from core.support import dbg; dbg()
|
||||
logger.info(" find_videos #" + patron + "#")
|
||||
matches = re.compile(patron).findall(page_url)
|
||||
|
||||
@@ -54,7 +55,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
sh = unshortenit.UnshortenIt()
|
||||
data, status = sh.unshorten(url)
|
||||
logger.info("Data - Status zcrypt vcrypt.net: [%s] [%s] " %(data, status))
|
||||
elif 'linkup' in url or 'bit.ly' in url:
|
||||
elif 'linkup' in url or 'bit.ly' in url or 'buckler' in url:
|
||||
logger.info("DATA LINK {}".format(url))
|
||||
if '/tv/' in url:
|
||||
url = url.replace('/tv/','/tva/')
|
||||
|
||||
Reference in New Issue
Block a user