Code Cleanup
This commit is contained in:
+44
-201
@@ -5,18 +5,15 @@
|
|||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
import channelselector
|
|
||||||
from channelselector import thumb
|
|
||||||
from core import httptools, scrapertoolsV2, servertools, tmdb, support, jsontools
|
from core import httptools, scrapertoolsV2, servertools, tmdb, support, jsontools
|
||||||
|
from core.support import log
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
from specials import autoplay, autorenumber
|
from specials import autoplay, autorenumber
|
||||||
|
|
||||||
__channel__ = 'animeworld'
|
host = config.get_setting("channel_host", 'animeworld')
|
||||||
host = config.get_setting("channel_host", __channel__)
|
|
||||||
headers = [['Referer', host]]
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
IDIOMAS = {'Italiano': 'Italiano'}
|
IDIOMAS = {'Italiano': 'Italiano'}
|
||||||
@@ -29,7 +26,7 @@ checklinks_number = config.get_setting('checklinks_number', 'animeworld')
|
|||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info(__channel__+" mainlist")
|
log()
|
||||||
|
|
||||||
itemlist =[]
|
itemlist =[]
|
||||||
|
|
||||||
@@ -42,26 +39,14 @@ def mainlist(item):
|
|||||||
support.menu(itemlist, 'Ultimi Aggiunti bold', 'video', host+'/newest', args=["anime"])
|
support.menu(itemlist, 'Ultimi Aggiunti bold', 'video', host+'/newest', args=["anime"])
|
||||||
support.menu(itemlist, 'Ultimi Episodi bold', 'video', host+'/updated', args=["novita'"])
|
support.menu(itemlist, 'Ultimi Episodi bold', 'video', host+'/updated', args=["novita'"])
|
||||||
support.menu(itemlist, 'Cerca...', 'search')
|
support.menu(itemlist, 'Cerca...', 'search')
|
||||||
|
support.aplay(item, itemlist, list_servers, list_quality)
|
||||||
|
support.channel_config(item, itemlist)
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
|
||||||
autoplay.show_option(item.channel, itemlist)
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel='setting',
|
|
||||||
action="channel_config",
|
|
||||||
title=support.typo("Configurazione Canale color lime"),
|
|
||||||
config=item.channel,
|
|
||||||
folder=False,
|
|
||||||
thumbnail=channelselector.get_thumb('setting_0.png'))
|
|
||||||
)
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
# Crea menu dei generi =================================================
|
# Crea menu dei generi =================================================
|
||||||
|
|
||||||
def generi(item):
|
def generi(item):
|
||||||
support.log(item.channel+" generi")
|
log()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
patron_block = r'</i>\sGeneri</a>\s*<ul class="sub">(.*?)</ul>'
|
patron_block = r'</i>\sGeneri</a>\s*<ul class="sub">(.*?)</ul>'
|
||||||
patron = r'<a href="([^"]+)"\stitle="([^"]+)">'
|
patron = r'<a href="([^"]+)"\stitle="([^"]+)">'
|
||||||
@@ -80,64 +65,29 @@ def generi(item):
|
|||||||
# Crea Menu Filtro ======================================================
|
# Crea Menu Filtro ======================================================
|
||||||
|
|
||||||
def build_menu(item):
|
def build_menu(item):
|
||||||
|
log()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
itemlist.append(Item(
|
support.menu(itemlist, 'Tutti bold submenu', 'video', item.url)
|
||||||
channel=item.channel,
|
matches = support.match(item,r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> (.*?) <span.*?>(.*?)<\/ul>',r'<form class="filters.*?>(.*?)<\/form>')
|
||||||
action="video",
|
for title, html in matches[0]:
|
||||||
title="[B]Tutti[/B]",
|
if title not in 'Lingua Ordine':
|
||||||
url=item.url))
|
support.menu(itemlist, title + ' submenu bold', 'build_sub_menu', item.url, args=html + ' anime')
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
data = re.sub(r'\n|\t','',data)
|
|
||||||
data = re.sub(r'>\s*<','><',data)
|
|
||||||
|
|
||||||
block = scrapertoolsV2.find_single_match(data, r'<form class="filters.*?>(.*?)<\/form>')
|
|
||||||
|
|
||||||
matches = re.compile(r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> (.*?) <span.*?>(.*?)<\/ul>', re.DOTALL).findall(block)
|
|
||||||
|
|
||||||
for title, html in matches:
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action='build_sub_menu',
|
|
||||||
contentType="tvshow",
|
|
||||||
title='[B] > ' + title + '[/B]',
|
|
||||||
fulltitle=title,
|
|
||||||
show=title,
|
|
||||||
url=item.url,
|
|
||||||
html=html,
|
|
||||||
thumbnail=item.thumbnail,
|
|
||||||
fanart=item.fanart))
|
|
||||||
|
|
||||||
# Elimina FLingua dal Menu
|
|
||||||
itemlist.pop(6)
|
|
||||||
itemlist.pop(6)
|
|
||||||
|
|
||||||
itemlist = thumb(itemlist)
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
# Crea SottoMenu Filtro ======================================================
|
# Crea SottoMenu Filtro ======================================================
|
||||||
|
|
||||||
def build_sub_menu(item):
|
def build_sub_menu(item):
|
||||||
|
log()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
matches = re.compile(r'<input.*?name="(.*?)" value="(.*?)".*?><label.*?>(.*?)<\/label>', re.DOTALL).findall(item.html)
|
matches = re.compile(r'<input.*?value="([^"]+)"> <label for="([^"]+)">([^<]+)<\/label>', re.DOTALL).findall(item.args)
|
||||||
for name, value, title in matches:
|
for value, name, title in matches:
|
||||||
itemlist.append(
|
support.menu(itemlist, support.typo(title, 'bold'), 'video', item.url + '&' + name + '=' + value)
|
||||||
Item(channel=item.channel,
|
|
||||||
action='video',
|
|
||||||
contentType="tvshow",
|
|
||||||
title='[B]' + title + ' >[/B]',
|
|
||||||
fulltitle=title,
|
|
||||||
show=title,
|
|
||||||
url=item.url + '&' + name + '=' + value,
|
|
||||||
plot=""))
|
|
||||||
itemlist = thumb(itemlist)
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
# Novità ======================================================
|
# Novità ======================================================
|
||||||
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
logger.info(__channel__+" newest")
|
log()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
item = Item()
|
item = Item()
|
||||||
try:
|
try:
|
||||||
@@ -161,7 +111,7 @@ def newest(categoria):
|
|||||||
# Cerca ===========================================================
|
# Cerca ===========================================================
|
||||||
|
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info(texto)
|
log(texto)
|
||||||
item.url = host + '/search?keyword=' + texto
|
item.url = host + '/search?keyword=' + texto
|
||||||
try:
|
try:
|
||||||
return video(item)
|
return video(item)
|
||||||
@@ -173,77 +123,47 @@ def search(item, texto):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Lista A-Z ====================================================
|
# Lista A-Z ====================================================
|
||||||
|
|
||||||
def alfabetico(item):
|
def alfabetico(item):
|
||||||
logger.info(__channel__+" alfabetico")
|
return support.scrape(item, '<a href="([^"]+)" title="([^"]+)">', ['url', 'title'], patron_block=r'<span>.*?A alla Z.<\/span>.*?<ul>(.*?)<\/ul>', action='lista_anime')
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
data = re.sub(r'\n|\t','',data)
|
|
||||||
data = re.sub(r'>\s*<','><',data)
|
|
||||||
|
|
||||||
block = scrapertoolsV2.find_single_match(data, r'<span>.*?A alla Z.<\/span>.*?<ul>(.*?)<\/ul>')
|
|
||||||
|
|
||||||
matches = re.compile('<a href="([^"]+)" title="([^"]+)">', re.DOTALL).findall(block)
|
|
||||||
scrapertoolsV2.printMatches(matches)
|
|
||||||
|
|
||||||
for url, title in matches:
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action='lista_anime',
|
|
||||||
contentType="tvshow",
|
|
||||||
title=title,
|
|
||||||
fulltitle=title,
|
|
||||||
show=title,
|
|
||||||
url=url,
|
|
||||||
plot=""))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
def lista_anime(item):
|
def lista_anime(item):
|
||||||
logger.info(__channel__+" lista_anime")
|
log()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
matches ,data = support.match(item, r'<div class="item"><a href="([^"]+)".*?src="([^"]+)".*?data-jtitle="([^"]+)".*?>([^<]+)<\/a><p>(.*?)<\/p>')
|
||||||
# Carica la pagina
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
data = re.sub(r'\n|\t','',data)
|
|
||||||
data = re.sub(r'>\s*<','><',data)
|
|
||||||
|
|
||||||
# Estrae i contenuti
|
|
||||||
patron = r'<div class="item"><a href="([^"]+)".*?src="([^"]+)".*?data-jtitle="([^"]+)".*?>([^<]+)<\/a><p>(.*?)<\/p>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedthumb, scrapedoriginal, scrapedtitle, scrapedplot in matches:
|
for scrapedurl, scrapedthumb, scrapedoriginal, scrapedtitle, scrapedplot in matches:
|
||||||
|
|
||||||
if scrapedoriginal == scrapedtitle:
|
if scrapedoriginal == scrapedtitle:
|
||||||
scrapedoriginal=''
|
scrapedoriginal=''
|
||||||
else:
|
else:
|
||||||
scrapedoriginal = ' - [ ' + scrapedoriginal + ' ]'
|
scrapedoriginal = support.typo(scrapedoriginal,' -- []')
|
||||||
|
|
||||||
year = ''
|
year = ''
|
||||||
lang = ''
|
lang = ''
|
||||||
|
infoLabels = {}
|
||||||
if '(' in scrapedtitle:
|
if '(' in scrapedtitle:
|
||||||
year = scrapertoolsV2.find_single_match(scrapedtitle, r'(\([0-9]+\))')
|
year = scrapertoolsV2.find_single_match(scrapedtitle, r'(\([0-9]+\))')
|
||||||
lang = scrapertoolsV2.find_single_match(scrapedtitle, r'(\([a-zA-Z]+\))')
|
lang = scrapertoolsV2.find_single_match(scrapedtitle, r'(\([a-zA-Z]+\))')
|
||||||
|
|
||||||
title = scrapedtitle.replace(year,'').replace(lang,'')
|
infoLabels['year'] = year
|
||||||
original = scrapedoriginal.replace(year,'').replace(lang,'')
|
title = scrapedtitle.replace(year,'').replace(lang,'').strip()
|
||||||
title = '[B]' + title + '[/B]' + year + lang + original
|
original = scrapedoriginal.replace(year,'').replace(lang,'').strip()
|
||||||
|
if lang: lang = support.typo(lang,'_ color kod')
|
||||||
|
title = '[B]' + title + '[/B]' + lang + original
|
||||||
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
extra=item.extra,
|
extra=item.extra,
|
||||||
contentType="episode",
|
contentType="episode",
|
||||||
action="episodios",
|
action="episodios",
|
||||||
text_color="azure",
|
|
||||||
title=title,
|
title=title,
|
||||||
url=scrapedurl,
|
url=scrapedurl,
|
||||||
thumbnail=scrapedthumb,
|
thumbnail=scrapedthumb,
|
||||||
fulltitle=title,
|
fulltitle=title,
|
||||||
show=title,
|
show=title,
|
||||||
|
infoLabels=infoLabels,
|
||||||
plot=scrapedplot,
|
plot=scrapedplot,
|
||||||
folder=True))
|
folder=True))
|
||||||
|
|
||||||
@@ -252,31 +172,15 @@ def lista_anime(item):
|
|||||||
|
|
||||||
# Next page
|
# Next page
|
||||||
support.nextPage(itemlist, item, data, r'<a class="page-link" href="([^"]+)" rel="next"')
|
support.nextPage(itemlist, item, data, r'<a class="page-link" href="([^"]+)" rel="next"')
|
||||||
# next_page = scrapertoolsV2.find_single_match(data, '<a class="page-link" href="([^"]+)" rel="next"')
|
|
||||||
#
|
|
||||||
# if next_page != '':
|
|
||||||
# itemlist.append(
|
|
||||||
# Item(channel=item.channel,
|
|
||||||
# action='lista_anime',
|
|
||||||
# title='[B]' + config.get_localized_string(30992) + ' >[/B]',
|
|
||||||
# url=next_page,
|
|
||||||
# contentType=item.contentType,
|
|
||||||
# thumbnail=thumb()))
|
|
||||||
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def video(item):
|
def video(item):
|
||||||
logger.info(__channel__+" video")
|
log()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
matches, data = support.match(item, r'<a href="([^"]+)" class="poster.*?> <img src="([^"]+)"(.*?)data-jtitle="([^"]+)" .*?>(.*?)<\/a>')
|
||||||
data = re.sub(r'\n|\t','',data)
|
|
||||||
data = re.sub(r'>\s*<','><',data)
|
|
||||||
|
|
||||||
patron = r'<a href="([^"]+)" class="poster.*?><img src="([^"]+)"(.*?)data-jtitle="([^"]+)" .*?>(.*?)<\/a>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedthumb ,scrapedinfo, scrapedoriginal, scrapedtitle in matches:
|
for scrapedurl, scrapedthumb ,scrapedinfo, scrapedoriginal, scrapedtitle in matches:
|
||||||
# Cerca Info come anno o lingua nel Titolo
|
# Cerca Info come anno o lingua nel Titolo
|
||||||
@@ -287,14 +191,14 @@ def video(item):
|
|||||||
lang = scrapertoolsV2.find_single_match(scrapedtitle, r'( \([a-zA-Z]+\))')
|
lang = scrapertoolsV2.find_single_match(scrapedtitle, r'( \([a-zA-Z]+\))')
|
||||||
|
|
||||||
# Rimuove Anno e Lingua nel Titolo
|
# Rimuove Anno e Lingua nel Titolo
|
||||||
title = scrapedtitle.replace(year,'').replace(lang,'')
|
title = scrapedtitle.replace(year,'').replace(lang,'').strip()
|
||||||
original = scrapedoriginal.replace(year,'').replace(lang,'')
|
original = scrapedoriginal.replace(year,'').replace(lang,'').strip()
|
||||||
|
|
||||||
# Compara Il Titolo con quello originale
|
# Compara Il Titolo con quello originale
|
||||||
if original == title:
|
if original == title:
|
||||||
original=''
|
original=''
|
||||||
else:
|
else:
|
||||||
original = ' - [ ' + scrapedoriginal + ' ]'
|
original = support.typo(scrapedoriginal,'-- []')
|
||||||
|
|
||||||
# cerca info supplementari
|
# cerca info supplementari
|
||||||
ep = ''
|
ep = ''
|
||||||
@@ -353,22 +257,11 @@ def video(item):
|
|||||||
|
|
||||||
# Next page
|
# Next page
|
||||||
support.nextPage(itemlist, item, data, r'<a\sclass="page-link"\shref="([^"]+)"\srel="next"\saria-label="Successiva')
|
support.nextPage(itemlist, item, data, r'<a\sclass="page-link"\shref="([^"]+)"\srel="next"\saria-label="Successiva')
|
||||||
# next_page = scrapertoolsV2.find_single_match(data, '<a class="page-link" href=".*?page=([^"]+)" rel="next"')
|
|
||||||
#
|
|
||||||
# if next_page != '':
|
|
||||||
# itemlist.append(
|
|
||||||
# Item(channel=item.channel,
|
|
||||||
# action='video',
|
|
||||||
# title='[B]' + config.get_localized_string(30992) + ' >[/B]',
|
|
||||||
# url=re.sub('&page=([^"]+)', '', item.url) + '&page=' + next_page,
|
|
||||||
# contentType=item.contentType,
|
|
||||||
# thumbnail=thumb()))
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
logger.info(__channel__+" episodios")
|
log()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data.replace('\n', '')
|
data = httptools.downloadpage(item.url).data.replace('\n', '')
|
||||||
@@ -400,39 +293,29 @@ def episodios(item):
|
|||||||
thumbnail=item.thumbnail))
|
thumbnail=item.thumbnail))
|
||||||
|
|
||||||
autorenumber.renumber(itemlist, item,'bold')
|
autorenumber.renumber(itemlist, item,'bold')
|
||||||
|
|
||||||
|
|
||||||
# Aggiungi a Libreria
|
|
||||||
# if config.get_videolibrary_support() and len(itemlist) != 0:
|
|
||||||
# itemlist.append(
|
|
||||||
# Item(
|
|
||||||
# channel=item.channel,
|
|
||||||
# title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
|
||||||
# url=item.url,
|
|
||||||
# action="add_serie_to_library",
|
|
||||||
# extra="episodios",
|
|
||||||
# show=item.show))
|
|
||||||
support.videolibrary(itemlist, item)
|
support.videolibrary(itemlist, item)
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info(__channel__+" findvideos")
|
log()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
# logger.debug(item.extra)
|
|
||||||
episode = '1'
|
episode = '1'
|
||||||
#recupero i server disponibili
|
|
||||||
if item.extra and item.extra['episode']:
|
if item.extra and item.extra['episode']:
|
||||||
data = item.extra['data']
|
data = item.extra['data']
|
||||||
episode = item.extra['episode']
|
episode = item.extra['episode']
|
||||||
else:
|
else:
|
||||||
data = httptools.downloadpage(item.url,headers=headers).data
|
data = httptools.downloadpage(item.url,headers=headers).data
|
||||||
|
|
||||||
block = scrapertoolsV2.find_single_match(data,r'data-target="\.widget\.servers.*?>(.*?)</div>')
|
block = scrapertoolsV2.find_single_match(data,r'data-target="\.widget\.servers.*?>(.*?)</div>')
|
||||||
servers = scrapertoolsV2.find_multiple_matches(block,r'class="tab.*?data-name="([0-9]+)">([^<]+)</span')
|
servers = scrapertoolsV2.find_multiple_matches(block,r'class="tab.*?data-name="([0-9]+)">([^<]+)</span')
|
||||||
|
|
||||||
videolist = []
|
videolist = []
|
||||||
videoData = ''
|
videoData = ''
|
||||||
|
|
||||||
for serverid, servername in servers:
|
for serverid, servername in servers:
|
||||||
#recupero l'id del video per questo server
|
#recupero l'id del video per questo server
|
||||||
block = scrapertoolsV2.find_single_match(data,r'<div class="server.*?data-id="'+serverid+'">(.*?)</ul>')
|
block = scrapertoolsV2.find_single_match(data,r'<div class="server.*?data-id="'+serverid+'">(.*?)</ul>')
|
||||||
@@ -447,7 +330,7 @@ def findvideos(item):
|
|||||||
post = urllib.urlencode({'r': '', 'd': 'www.animeworld.biz'})
|
post = urllib.urlencode({'r': '', 'd': 'www.animeworld.biz'})
|
||||||
dataJson = httptools.downloadpage(json['grabber'].replace('/v/','/api/source/'),headers=[['x-requested-with', 'XMLHttpRequest']],post=post).data
|
dataJson = httptools.downloadpage(json['grabber'].replace('/v/','/api/source/'),headers=[['x-requested-with', 'XMLHttpRequest']],post=post).data
|
||||||
json = jsontools.load(dataJson)
|
json = jsontools.load(dataJson)
|
||||||
logger.debug(json['data'])
|
log(json['data'])
|
||||||
if json['data']:
|
if json['data']:
|
||||||
for file in json['data']:
|
for file in json['data']:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
@@ -477,45 +360,5 @@ def findvideos(item):
|
|||||||
|
|
||||||
|
|
||||||
itemlist += servertools.find_video_items(item,videoData)
|
itemlist += servertools.find_video_items(item,videoData)
|
||||||
|
|
||||||
return support.server(item,itemlist=itemlist)
|
return support.server(item,itemlist=itemlist)
|
||||||
|
|
||||||
anime_id = scrapertoolsV2.find_single_match(item.url, r'.*\..*?\/(.*)')
|
|
||||||
data = httptools.downloadpage(host + "/ajax/episode/serverPlayer?id=" + anime_id).data
|
|
||||||
patron = '<source src="([^"]+)"'
|
|
||||||
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
|
|
||||||
for video in matches:
|
|
||||||
itemlist.append(
|
|
||||||
Item(
|
|
||||||
channel=item.channel,
|
|
||||||
action="play",
|
|
||||||
# title=item.title + " [[COLOR orange]Diretto[/COLOR]]",
|
|
||||||
title='diretto',
|
|
||||||
quality='',
|
|
||||||
url=video,
|
|
||||||
server='directo',
|
|
||||||
show=item.show,
|
|
||||||
contentType=item.contentType,
|
|
||||||
folder=False))
|
|
||||||
|
|
||||||
return support.server(item,data, itemlist)
|
|
||||||
|
|
||||||
# Requerido para Filtrar enlaces
|
|
||||||
|
|
||||||
if checklinks:
|
|
||||||
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
|
||||||
|
|
||||||
# Requerido para FilterTools
|
|
||||||
|
|
||||||
# itemlist = filtertools.get_links(itemlist, item, list_language)
|
|
||||||
|
|
||||||
# Requerido para AutoPlay
|
|
||||||
|
|
||||||
autoplay.start(itemlist, item)
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -452,7 +452,7 @@ def match(item, patron='', patron_block='', headers='', url=''):
|
|||||||
matches = []
|
matches = []
|
||||||
url = url if url else item.url
|
url = url if url else item.url
|
||||||
data = httptools.downloadpage(url, headers=headers).data.replace("'", '"')
|
data = httptools.downloadpage(url, headers=headers).data.replace("'", '"')
|
||||||
data = re.sub('\n|\t', '', data)
|
data = re.sub(r'\n|\t|\s\s', '', data)
|
||||||
log('DATA= ', data)
|
log('DATA= ', data)
|
||||||
|
|
||||||
if patron_block:
|
if patron_block:
|
||||||
|
|||||||
Reference in New Issue
Block a user