Corrección scrapertools.cachepage y scrapertools.get_match
This commit is contained in:
@@ -44,11 +44,11 @@ def categorias(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||
if item.title=="Canal":
|
||||
data = scrapertools.get_match(data,'<div class="footer-banner">(.*?)<div id="footer-copyright">')
|
||||
data = scrapertools.find_single_match(data,'<div class="footer-banner">(.*?)<div id="footer-copyright">')
|
||||
if item.title=="Productora" :
|
||||
data = scrapertools.get_match(data,'<li id="menu-item-16"(.*?)</ul>')
|
||||
data = scrapertools.find_single_match(data,'<li id="menu-item-16"(.*?)</ul>')
|
||||
if item.title=="Categorias" :
|
||||
data = scrapertools.get_match(data,'<a>Categories</a>(.*?)</ul>')
|
||||
data = scrapertools.find_single_match(data,'<a>Categories</a>(.*?)</ul>')
|
||||
patron = '<a href="([^"]+)">([^"]+)</a>'
|
||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
||||
for scrapedurl,scrapedtitle in matches:
|
||||
@@ -95,7 +95,7 @@ def play(item):
|
||||
variable = scrapertools.find_single_match(data,'<script type=\'text/javascript\'> str=\'([^\']+)\'')
|
||||
resuelta = re.sub("@[A-F0-9][A-F0-9]", lambda m: m.group()[1:].decode('hex'), variable)
|
||||
url = scrapertools.find_single_match(resuelta,'<iframe src="([^"]+)"')
|
||||
data = scrapertools.cachePage(url)
|
||||
data = httptools.downloadpage(item.url).data
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title
|
||||
|
||||
Reference in New Issue
Block a user