modifiche varie

This commit is contained in:
marco
2020-07-30 21:27:11 +02:00
parent c35a78336e
commit 8a2ad04880
3 changed files with 7 additions and 8 deletions

View File

@@ -22,7 +22,7 @@ from core.item import Item
from platformcode import config
def findhost():
data = support.httptools.downloadpage('https://altadefinizione-nuovo.link/').data
data = support.httptools.downloadpage('https://altadefinizione-nuovo.info/').data
host = support.scrapertools.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
return host

View File

@@ -10,7 +10,7 @@ from core.item import Item
from platformcode import config
def findhost():
page = httptools.downloadpage("https://www.filmpertutti.group/").data
page = httptools.downloadpage("https://filmpertutti.nuovo.live/").data
url = scrapertools.find_single_match(page, 'Il nuovo indirizzo di FILMPERTUTTI è <a href="([^"]+)')
return url

View File

@@ -4,7 +4,7 @@
# you can pass specific channel name using KOD_TST_CH environment var
# export PYTHONPATH=/home/user/.kodi/addons/plugin.video.kod
# export KOD_TST_CH = channel
# export KOD_TST_CH=channel
# python tests/test_generic.py
import os
@@ -87,9 +87,6 @@ chNumRis = {
'Film': 24,
'Serie TV': 24,
},
'guardaSerie TVclick': {
'da controllare': 0
},
'hd4me': {
'Film': 10
},
@@ -206,7 +203,7 @@ class GenericChannelTest(unittest.TestCase):
@parameterized.parameterized_class(
[{'ch': ch['ch'], 'title': title, 'itemlist': itemlist, 'serversFound': ch['serversFound'][title] if title in ch['serversFound'] else True} for ch in channels for
[{'ch': ch['ch'], 'title': title, 'itemlist': itemlist, 'serversFound': ch['serversFound'][title] if title in ch['serversFound'] else True, 'module': ch['module']} for ch in channels for
title, itemlist in ch['menuItemlist'].items()])
class GenericChannelMenuItemTest(unittest.TestCase):
def test_menu(self):
@@ -220,7 +217,9 @@ class GenericChannelMenuItemTest(unittest.TestCase):
if content in self.title:
risNum = len([i for i in itemlist if not i.nextPage]) # not count nextpage
self.assertEqual(chNumRis[self.ch][content], risNum,
'channel ' + self.ch + ' -> ' + self.title + ' returned wrong number of results')
'channel ' + self.ch + ' -> ' + self.title + ' returned wrong number of results\n'
+ str(chNumRis[self.ch][content]) + ' but should be ' + str(risNum) + '\n' +
'\n'.join([i.title for i in itemlist if not i.nextPage]))
break
for resIt in itemlist: