Fix ilgenio (link in re-upload), cb01 caso speciale serie e soppressione errori nei canali in videoteca

This commit is contained in:
mac12m99
2021-05-01 14:55:45 +02:00
parent a895bd04fc
commit 12690dfbb9
3 changed files with 14 additions and 10 deletions

View File

@@ -135,9 +135,9 @@ def episodios(item):
addVideolibrary = False
downloadEnabled = False
folderUrl = scrapertools.find_single_match(data, r'TUTTA LA \w+\s+(?:&#8211;|-)\s+<a href="?([^" ]+)').replace(
folderUrl = scrapertools.find_single_match(data, r'TUTTA L[EA] \w+\s+(?:&#8211;|-)\s+<a href="?([^" ]+)').replace(
'.net/', '.pw/') # vcrypt.pw non ha CF
data = httptools.downloadpage(folderUrl).data
data = httptools.downloadpage(folderUrl, disable_directIP=True).data
patron = r'><a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)'
sceneTitle = True
@@ -148,7 +148,7 @@ def episodios(item):
# debug=True
data = support.match(item.url, headers=headers).data
folderItemlist = folder(item, data) if 'TUTTA LA ' in data else []
folderItemlist = folder(item, data) if '<p>TUTTA L' in data else []
patronBlock = r'(?P<block>sp-head[^>]+>\s*(?:STAGION[EI]\s*(?:DA\s*[0-9]+\s*A)?\s*[0-9]+|MINISERIE) - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?<\/div>.*?)spdiv[^>]*>'
patron = r'(?:/>|<p>|<strong>)(?P<other>.*?(?P<episode>[0-9]+(?:&#215;|×)[0-9]+)\s*(?P<title2>.*?)?(?:\s*&#8211;|\s*-|\s*<).*?)(?:<\/p>|<br)'

View File

@@ -183,8 +183,9 @@ def findvideos(item):
for link in encLinks:
linkDec = base64.b64decode(link.encode()).decode()
if 'player.php' in linkDec:
linkDec = support.httptools.downloadpage(linkDec, only_headers=True, follow_redirects=False).headers['Location']
list_url.append(linkDec)
linkDec = support.httptools.downloadpage(linkDec, only_headers=True, follow_redirects=False).headers.get('Location')
if linkDec:
list_url.append(linkDec)
if list_servers:
for i, url in enumerate(list_url):
itemlist.append(support.Item(

View File

@@ -515,15 +515,18 @@ def findvideos(item):
from core import servertools
ch_results.append(executor.submit(servertools.find_video_items, item_json))
except Exception as ex:
except:
import traceback
logger.error("The findvideos function for the channel %s failed" % nom_canal)
template = "An exception of type %s occured. Arguments:\n%r"
message = template % (type(ex).__name__, ex.args)
logger.error(message)
logger.error(traceback.format_exc())
for ris in futures.as_completed(ch_results):
list_servers.extend(ris.result())
try:
list_servers.extend(ris.result())
except:
import traceback
logger.error("The findvideos function for a channel failed")
logger.error(traceback.format_exc())
# Change the title to the servers adding the name of the channel in front and the infoLabels and the images of the item if the server does not have