Fix parziale altadefinizione, corretto catastrophic backtraking su guardaseriecam (in alcuni casi)

This commit is contained in:
marco
2023-09-26 20:49:45 +02:00
parent 08eb178410
commit e14f01ec80
2 changed files with 5 additions and 5 deletions

View File

@@ -66,13 +66,13 @@ def search(item, text):
@support.scrape
def peliculas(item):
n = '22' if '/?s=' in item.url else '8'
item.contentType = "undefined"
action = 'check'
patron = r'src="(?P<poster>http[^"]+)(?:[^>]+>){4}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h2>'
if item.args == 'search':
patron = r'<item>\s*<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*[^>]+>\s*<link>(?P<url>[^<]+)'
patron = r'src="(?P<poster>http[^"]+)(?:[^>]+>){5}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h1>'
# if item.args == 'search':
# patron = r'<item>\s*<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*[^>]+>\s*<link>(?P<url>[^<]+)'
patronNext = r'href="([^"]+)[^>]+>Successivo'
# debug = True
return locals()

View File

@@ -36,7 +36,7 @@ def list(item):
@support.scrape
def peliculas(item):
# debug = True
patron = r'<div class="mlnh-thumb"><a href="(?P<url>[^"]+).*?title="(?P<title>[^"]+).*?src="(?P<thumb>[^"]+).*?hdn">(?P<year>[0-9]{4})'
patron = r'<div class="mlnh-thumb"><a href="(?P<url>[^"]+)[^>]+title="(?P<title>[^"]+).*?<img src="(?P<thumb>[^"]+).*?hdn">[^<]*(?P<year>[0-9]{4})'
patronNext = 'pagenavi.*?<a href="([^"]+)">\d+'
action = 'episodios'
return locals()