From e1d2352dc25f082d0a9a11612c04b3456368c699 Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Mon, 13 Sep 2021 20:42:06 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20sezioni=20novit=C3=A0=20per=20eurostreami?= =?UTF-8?q?ng=20e=20tantifilm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- channels/aniplay.py | 2 +- channels/eurostreaming.py | 5 +++-- channels/tantifilm.py | 2 +- tests/test_generic.py | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/channels/aniplay.py b/channels/aniplay.py index dd43e9dc..12236ae9 100644 --- a/channels/aniplay.py +++ b/channels/aniplay.py @@ -128,7 +128,7 @@ def latest_added(item): js = httptools.downloadpage(url).json for episode in js: - title = episode['title'] + title = episode['title'] if episode['title'] else '' animeTitle, lang = get_lang(episode['animeTitle']) quality = 'Full HD' if episode['fullHd'] else 'HD' long_title = support.typo('{}. {}{}'.format(int(float(episode['episodeNumber'])), title + ' - ' if title else '', animeTitle), 'bold') + support.typo(lang, '_ [] color kod') + support.typo(quality, '_ [] color kod') diff --git a/channels/eurostreaming.py b/channels/eurostreaming.py index b67a33e9..c9fc0a95 100644 --- a/channels/eurostreaming.py +++ b/channels/eurostreaming.py @@ -20,7 +20,7 @@ def mainlist(item): support.info() tvshow = [] anime = ['/category/anime-cartoni-animati/'] - mix = [('Aggiornamenti {bullet bold} {TV}', ['/aggiornamento-episodi/', 'peliculas', 'newest']), + mix = [('Aggiornamenti {bullet bold} {TV}', ['/aggiornamento-nuovi-episodi/', 'peliculas', 'newest']), ('Archivio {bullet bold} {TV}', ['/category/serie-tv-archive/', 'peliculas'])] search = '' @@ -42,6 +42,7 @@ def peliculas(item): return locals() + @support.scrape def episodios(item): # debug = True @@ -83,7 +84,7 @@ def newest(categoria): item.contentType = 'tvshow' item.args = 'newest' try: - item.url = "%s/aggiornamento-episodi/" % host + item.url = "%s/aggiornamento-nuovi-episodi/" % host item.action = "peliculas" itemlist = peliculas(item) # Continua la ricerca in caso di errore diff --git a/channels/tantifilm.py b/channels/tantifilm.py index f39abca1..b04ac070 100644 --- a/channels/tantifilm.py +++ b/channels/tantifilm.py @@ -136,7 +136,7 @@ def newest(categoria): item = Item(url=host + '/aggiornamenti-serie-tv') data = support.match(item).data.replace('','').replace('','') item.contentType = 'episode' - patronBlock = r'Aggiornamenti Giornalieri Serie TV.*?
(?P.*?)
' + patronBlock = r'Aggiornamenti (?:Giornalieri )?Serie TV.*?
(?P.*?)
' patron = r'

(?P.*?)\((?P<year>[0-9]{4})[^\)]*\)[^<]+<a href="(?P<url>[^"]+)">(?P<episode>[^ ]+) (?P<lang>[Ss][Uu][Bb].[Ii][Tt][Aa])?(?P<title2>[^<]+)?' return locals() diff --git a/tests/test_generic.py b/tests/test_generic.py index 21fcf59d..0ab8bf69 100644 --- a/tests/test_generic.py +++ b/tests/test_generic.py @@ -319,7 +319,7 @@ class GenericServerTest(unittest.TestCase): def test_get_video_url(self): module = __import__('servers.%s' % self.name, fromlist=["servers.%s" % self.name]) page_url = self.server.url - # httptools.default_headers['Referer'] = self.server.referer + httptools.default_headers['Referer'] = self.server.referer print('testing ' + page_url) print('Found on ' + self.server.foundOn) print()