Corrección scrapertools.cachepage y scrapertools.get_match

This commit is contained in:
paezner
2019-04-03 17:19:52 +02:00
parent 867a14fe23
commit 550e67da94
33 changed files with 76 additions and 112 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ def categorias(item):
itemlist = []
data = httptools.downloadpage(item.url).data
data = re.sub(r"\n|\r|\t|&nbsp;|<br>|<br/>", "", data)
data = scrapertools.get_match(data,'<div id="content">(.*?)<div class="maincat">')
data = scrapertools.find_single_match(data,'<div id="content">(.*?)<div class="maincat">')
patron = '<a href="(.*?)".*?'
patron += '<img src="(.*?)".*?alt="(.*?)"'
matches = re.compile(patron,re.DOTALL).findall(data)