Fix guardaserieclick e ricerca ilgenio
This commit is contained in:
@@ -25,18 +25,16 @@ headers = [['Referer', host]]
|
|||||||
|
|
||||||
@support.menu
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
|
tvshow = ['',
|
||||||
tvshow = ['/lista-serie-tv',
|
('Aggiornamenti', ['', 'peliculas', 'update']),
|
||||||
('Aggiornamenti', ['/lista-serie-tv', 'peliculas', 'update']),
|
('Generi', ['', 'genres', 'genres']),
|
||||||
('Generi', ['/categorie', 'genres', 'genres']),
|
('News Sub-ITA', ['', 'peliculas', 'ined']),
|
||||||
('News Sub-ITA', ['/lista-serie-tv', 'peliculas', 'ined']),
|
('Anime/Cartoni', ["/category/animazione/", 'peliculas', 'genres'])
|
||||||
('Da non perdere', ['/lista-serie-tv', 'peliculas', 'nolost']),
|
]
|
||||||
('Classiche', ["/lista-serie-tv", 'peliculas', 'classic']),
|
|
||||||
('Anime/Cartoni', ["/category/animazione/", 'peliculas', 'genres'])
|
|
||||||
]
|
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
##@support.scrape
|
##@support.scrape
|
||||||
##def peliculas(item):
|
##def peliculas(item):
|
||||||
#### import web_pdb; web_pdb.set_trace()
|
#### import web_pdb; web_pdb.set_trace()
|
||||||
@@ -76,7 +74,7 @@ def mainlist(item):
|
|||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
## import web_pdb; web_pdb.set_trace()
|
## import web_pdb; web_pdb.set_trace()
|
||||||
info('peliculas ->\n', item)
|
info('peliculas ->\n', item)
|
||||||
|
|
||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
@@ -87,36 +85,36 @@ def peliculas(item):
|
|||||||
patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</p>'
|
patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</p>'
|
||||||
patronNext = r'rel="next" href="([^"]+)">'
|
patronNext = r'rel="next" href="([^"]+)">'
|
||||||
item.contentType = 'tvshow'
|
item.contentType = 'tvshow'
|
||||||
## elif item.args == 'search':
|
## elif item.args == 'search':
|
||||||
## patronBlock = r'<h2 style="color:\s?white !important.?" class="title-typology">(?P<block>.*?)<div class="container-fluid whitebg" style="">'
|
## patronBlock = r'<h2 style="color:\s?white !important.?" class="title-typology">(?P<block>.*?)<div class="container-fluid whitebg" style="">'
|
||||||
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</p>'
|
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</p>'
|
||||||
else:
|
else:
|
||||||
end_block = r'(?P<block>.*?)<div\s+class="btn btn-lg btn-default btn-load-other-series">'
|
end_block = r'(?P<block>.*?)<div\s+class="btn btn-lg btn-default btn-load-other-series">'
|
||||||
patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
||||||
pagination = 25
|
pagination = 25
|
||||||
if item.args == 'ined':
|
if item.args == 'ined':
|
||||||
deflang = 'SUB-ITA'
|
deflang = 'SUB-ITA'
|
||||||
patronBlock = r'<span\s+class="label label-default label-title-typology">'+end_block
|
patronBlock = r'<span\s+class="label label-default label-title-typology">' + end_block
|
||||||
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
||||||
## pagination = 25
|
## pagination = 25
|
||||||
elif item.args == 'update':
|
elif item.args == 'update':
|
||||||
patronBlock = r'<div\s+class="container-fluid greybg title-serie-lastep title-last-ep fixed-title-wrapper containerBottomBarTitle">'+end_block
|
patronBlock = r'<div\s+class="container-fluid greybg title-serie-lastep title-last-ep fixed-title-wrapper containerBottomBarTitle">' + end_block
|
||||||
patron = r'<a(?: rel="[^"]+")? href="(?P<url>[^"]+)"(?: class="[^"]+")?>[ ]<img class="[^"]+"[ ]title="[^"]+"[ ]alt="[^"]+"[ ](?:|meta-)?src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?:\d+.\d+)[ ]\((?P<lang>[a-zA-Z\-]+)[^<]+<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<'
|
patron = r'href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>.+?class="strongText">(?P<title>.+?)<'
|
||||||
elif item.args == 'nolost':
|
# elif item.args == 'nolost':
|
||||||
patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-danonperd">'+end_block
|
# patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-danonperd">' + end_block
|
||||||
## pagination = 25
|
# pagination = 25
|
||||||
elif item.args == 'classic':
|
# elif item.args == 'classic':
|
||||||
patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-classiche">'+end_block
|
# patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-classiche">' + end_block
|
||||||
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
||||||
## pagination = 25
|
## pagination = 25
|
||||||
## elif item.args == 'anime':
|
## elif item.args == 'anime':
|
||||||
##
|
##
|
||||||
else:
|
else:
|
||||||
patronBlock = r'<div\s+class="container container-title-serie-new container-scheda" meta-slug="new">'+end_block
|
patronBlock = r'<div\s+class="container container-title-serie-new container-scheda" meta-slug="new">' + end_block
|
||||||
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
||||||
## pagination = 25
|
## pagination = 25
|
||||||
#support.regexDbg(item, patronBlock, headers)
|
# support.regexDbg(item, patronBlock, headers)
|
||||||
#debug = True
|
# debug = True
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@@ -129,21 +127,21 @@ def episodios(item):
|
|||||||
patronBlock = r'<h2 class="title-typology">Episodi (?P<stagione>\d+).{1,3}Stagione</h2>(?P<block>.*?)<div class="container">'
|
patronBlock = r'<h2 class="title-typology">Episodi (?P<stagione>\d+).{1,3}Stagione</h2>(?P<block>.*?)<div class="container">'
|
||||||
|
|
||||||
def itemHook(item):
|
def itemHook(item):
|
||||||
item.title = item.title.replace(item.fulltitle, '').replace('-','',1)
|
item.title = item.title.replace(item.fulltitle, '').replace('-', '', 1)
|
||||||
return item
|
return item
|
||||||
|
|
||||||
#debug = True
|
# debug = True
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def genres(item):
|
def genres(item):
|
||||||
info()
|
info()
|
||||||
|
|
||||||
action = 'peliculas'
|
action = 'peliculas'
|
||||||
patron = r'<li>\s<a\shref="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)</a></li>'
|
patronMenu = r'<li>\s<a\shref="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)</a></li>'
|
||||||
patron_block = r'<ul\sclass="dropdown-menu category">(?P<block>.*?)</ul>'
|
patron_block = r'<ul\sclass="dropdown-menu category">(?P<block>.*?)</ul>'
|
||||||
item.contentType = ''
|
# debug = True
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@@ -161,15 +159,16 @@ def search(item, text):
|
|||||||
info("%s" % line)
|
info("%s" % line)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
info()
|
info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
item = Item()
|
item = Item()
|
||||||
item.contentType= 'tvshow'
|
item.contentType = 'tvshow'
|
||||||
item.args = 'update'
|
item.args = 'update'
|
||||||
try:
|
try:
|
||||||
if categoria == "series":
|
if categoria == "series":
|
||||||
item.url = "%s/lista-serie-tv" % host
|
item.url = host
|
||||||
item.action = "peliculas"
|
item.action = "peliculas"
|
||||||
itemlist = peliculas(item)
|
itemlist = peliculas(item)
|
||||||
|
|
||||||
|
|||||||
@@ -124,9 +124,9 @@ def genres(item):
|
|||||||
|
|
||||||
def search(item, text):
|
def search(item, text):
|
||||||
info(text)
|
info(text)
|
||||||
itemlist = []
|
import uuid
|
||||||
text = text.replace(' ', '+')
|
text = text.replace(' ', '+')
|
||||||
item.url = host + '/?a=b&s=' + text
|
item.url = host + '/?' + uuid.uuid4().hex + '=' + uuid.uuid4().hex + '&s=' + text
|
||||||
try:
|
try:
|
||||||
item.args = 'search'
|
item.args = 'search'
|
||||||
return peliculas(item)
|
return peliculas(item)
|
||||||
|
|||||||
Reference in New Issue
Block a user