un paio di fix
This commit is contained in:
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -2,7 +2,7 @@ name: Test Suite
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '00 16 * * *'
|
||||
- cron: '00 15 * * *'
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
|
||||
@@ -29,13 +29,14 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
action = 'episodios'
|
||||
if item.args == 'newest':
|
||||
item.contentType = 'episode'
|
||||
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>[^<]+) –\s*<a href="(?P<url>[^"]+)"[^>]*>\s?(?P<episode>\d+[×x]\d+-\d+|\d+[×x]\d+) (?P<title2>[^<\(]+)\s?\(?(?P<lang>SUB ITA)?\)?</a>'
|
||||
pagination = ''
|
||||
else:
|
||||
patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)\s?(?: Serie Tv)?\s?\(?(?P<year>\d{4})?\)?<\/a><\/h2>'
|
||||
patron = r'<div class="post-thumb">.*?<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)\s?(?: Serie Tv)?\s?\(?(?P<year>\d{4})?\)?<\/a><\/h2>'
|
||||
patronNext=r'a class="next page-numbers" href="?([^>"]+)">Avanti »</a>'
|
||||
|
||||
return locals()
|
||||
|
||||
@@ -9,7 +9,7 @@ from platformcode import config
|
||||
|
||||
def findhost(url):
|
||||
page = httptools.downloadpage(url).data
|
||||
url = support.scrapertools.find_single_match(page, 'Il nuovo indirizzo di FILMPERTUTTI è <a href="([^"]+)')
|
||||
url = support.scrapertools.find_single_match(page, 'Il nuovo indirizzo di FILMPERTUTTI è ?<a href="([^"]+)')
|
||||
return url
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2 class="text-capitalize">{{ title }}</h2>
|
||||
@@ -113,8 +113,8 @@
|
||||
{%- if subtest.err or subtest.err %}
|
||||
<tr style="display:none;">
|
||||
<td class="col-xs-9" colspan="3">
|
||||
{%- if subtest.err %}<p style="color:maroon;">{{ subtest.err[0].__name__ }}: {{ subtest.err[1] }}</p>{% endif %}
|
||||
{%- if subtest.err %}<p style="color:maroon;">{{ subtest.test_exception_info }}</p>{% endif %}
|
||||
{%- if subtest.err %}<p style="color:maroon;">{{ subtest.err[0].__name__ }}: {{ subtest.err[1] }}</p>{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{%- endif %}
|
||||
|
||||
@@ -209,11 +209,11 @@ for chItem in channel_list:
|
||||
logMenu[it.title] = logger.recordedLog
|
||||
logger.recordedLog = ''
|
||||
|
||||
results.append(
|
||||
{'ch': ch, 'hasChannelConfig': hasChannelConfig, 'mainlist': [it.title for it in mainlist],
|
||||
'menuItemlist': {k: [it.tojson() if type(it) == Item else it for it in menuItemlist[k]] for k in menuItemlist.keys()},
|
||||
'serversFound': {k: [it.tojson() if type(it) == Item else it for it in menuItemlist[k]] for k in menuItemlist.keys()},
|
||||
'module': str(module), 'logMenu': logMenu, 'error': error})
|
||||
# results.append(
|
||||
# {'ch': ch, 'hasChannelConfig': hasChannelConfig, 'mainlist': [it.title for it in mainlist],
|
||||
# 'menuItemlist': {k: [it.tojson() if type(it) == Item else it for it in menuItemlist[k]] for k in menuItemlist.keys()},
|
||||
# 'serversFound': {k: [it.tojson() if type(it) == Item else it for it in menuItemlist[k]] for k in menuItemlist.keys()},
|
||||
# 'module': str(module), 'logMenu': logMenu, 'error': error})
|
||||
channels.append(
|
||||
{'ch': ch, 'hasChannelConfig': hasChannelConfig, 'mainlist': mainlist, 'menuItemlist': menuItemlist,
|
||||
'serversFound': serversFound, 'module': module, 'logMenu': logMenu, 'error': error})
|
||||
@@ -222,9 +222,10 @@ logger.record = False
|
||||
|
||||
from specials import news
|
||||
dictNewsChannels, any_active = news.get_channels_list()
|
||||
if not os.path.isdir(outDir):
|
||||
os.mkdir(outDir)
|
||||
json.dump(results, open(os.path.join(outDir, 'result.json'), 'w'))
|
||||
# if not os.path.isdir(outDir):
|
||||
# os.mkdir(outDir)
|
||||
# json.dump(results, open(os.path.join(outDir, 'result.json'), 'w'))
|
||||
|
||||
# only 1 server item for single server
|
||||
serverNames = []
|
||||
serversFinal = []
|
||||
|
||||
Reference in New Issue
Block a user