Fix Film per Tutti
This commit is contained in:
@@ -2,19 +2,7 @@
|
|||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Canale per filmpertutti.py
|
# 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
|
import re
|
||||||
|
|
||||||
from core import scrapertools, httptools, support
|
from core import scrapertools, httptools, support
|
||||||
@@ -24,7 +12,7 @@ from platformcode import config
|
|||||||
|
|
||||||
host = config.get_channel_url()
|
host = config.get_channel_url()
|
||||||
headers = [['Referer', host]]
|
headers = [['Referer', host]]
|
||||||
list_servers = ['speedvideo', 'verystream', 'openload', 'streamango', 'wstream', 'akvideo']
|
list_servers = ['mixdrop', 'akvideo', 'wstream', 'onlystream', 'speedvideo']
|
||||||
list_quality = ['HD', 'SD']
|
list_quality = ['HD', 'SD']
|
||||||
|
|
||||||
@support.menu
|
@support.menu
|
||||||
@@ -74,16 +62,11 @@ def peliculas(item):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
data = support.match(item.url, headers=headers).data
|
||||||
data = re.sub('\n|\t', ' ', data)
|
|
||||||
data = re.sub(r'>\s+<', '> <', data)
|
|
||||||
support.log('SERIES DATA= ',data)
|
|
||||||
if 'accordion-item' in 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)'
|
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:
|
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)'
|
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)'
|
patron = r'(?:/>|p>)\s*(?P<season>\d+)(?:×|×|x)(?P<episode>\d+)[^<]+(?P<url>.*?)(?:<br|</p)'
|
||||||
def itemHook(item):
|
def itemHook(item):
|
||||||
@@ -104,17 +87,16 @@ def genres(item):
|
|||||||
|
|
||||||
action = 'peliculas'
|
action = 'peliculas'
|
||||||
patronBlock = r'<select class="cats">(?P<block>.*?)<\/select>'
|
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()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
def select(item):
|
def select(item):
|
||||||
support.log()
|
support.log()
|
||||||
|
patron=r'class="taxonomy category" ><span property="name">([^>]+)</span></a><meta property="position" content="2">'
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
block = support.match(item.url, patron=patron,headers=headers).match
|
||||||
patronBlock = scrapertools.find_single_match(data, r'class="taxonomy category" ><span property="name">(.*?)</span></a><meta property="position" content="2">')
|
if block.lower() != 'film':
|
||||||
if patronBlock.lower() != 'film':
|
|
||||||
support.log('select = ### è una serie ###')
|
support.log('select = ### è una serie ###')
|
||||||
item.contentType='tvshow'
|
item.contentType='tvshow'
|
||||||
return episodios(item)
|
return episodios(item)
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ class UnshortenIt(object):
|
|||||||
_rapidcrypt_regex = r'rapidcrypt\.net'
|
_rapidcrypt_regex = r'rapidcrypt\.net'
|
||||||
_cryptmango_regex = r'cryptmango|xshield\.net'
|
_cryptmango_regex = r'cryptmango|xshield\.net'
|
||||||
_vcrypt_regex = r'vcrypt\.net'
|
_vcrypt_regex = r'vcrypt\.net'
|
||||||
_linkup_regex = r'linkup\.pro'
|
_linkup_regex = r'linkup\.pro|buckler.link'
|
||||||
|
|
||||||
_maxretries = 5
|
_maxretries = 5
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
patronvideos = [
|
patronvideos = [
|
||||||
r'(https?://(gestyy|rapidteria|sprysphere)\.com/[a-zA-Z0-9]+)',
|
r'(https?://(gestyy|rapidteria|sprysphere)\.com/[a-zA-Z0-9]+)',
|
||||||
r'(https?://(?:www\.)?(vcrypt|linkup)\.[^/]+/[^/]+/[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_\.]+)'
|
r'(https?://(?:www\.)?(xshield)\.[^/]+/[^/]+/[^/]+/[a-zA-Z0-9_\.]+)'
|
||||||
]
|
]
|
||||||
|
|
||||||
for patron in patronvideos:
|
for patron in patronvideos:
|
||||||
|
# from core.support import dbg; dbg()
|
||||||
logger.info(" find_videos #" + patron + "#")
|
logger.info(" find_videos #" + patron + "#")
|
||||||
matches = re.compile(patron).findall(page_url)
|
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()
|
sh = unshortenit.UnshortenIt()
|
||||||
data, status = sh.unshorten(url)
|
data, status = sh.unshorten(url)
|
||||||
logger.info("Data - Status zcrypt vcrypt.net: [%s] [%s] " %(data, status))
|
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))
|
logger.info("DATA LINK {}".format(url))
|
||||||
if '/tv/' in url:
|
if '/tv/' in url:
|
||||||
url = url.replace('/tv/','/tva/')
|
url = url.replace('/tv/','/tva/')
|
||||||
|
|||||||
Reference in New Issue
Block a user