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