Skip to content

Commit

Permalink
Update plugin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Belfagor2005 committed Aug 23, 2024
1 parent 63b04af commit 5061e6a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions usr/lib/enigma2/python/Plugins/Extensions/vavoo/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from Screens.Screen import Screen
from Screens.Standby import TryQuitMainloop
from Screens.VirtualKeyBoard import VirtualKeyBoard
from six.moves.urllib.parse import unquote
from Tools.Directories import (SCOPE_PLUGINS, resolveFilename)
from enigma import (
RT_VALIGN_CENTER,
Expand Down Expand Up @@ -110,7 +111,7 @@
HALIGN = RT_HALIGN_LEFT
screenwidth = getDesktop(0).size()
# default_font = ''

regexs = '<a[^>]*href="([^"]+)"[^>]*><img[^>]*src="([^"]+)"[^>]*>'

# log
def trace_error():
Expand Down Expand Up @@ -762,6 +763,7 @@ def cat(self):
match = re.compile(regexcat, re.DOTALL).findall(content)
for country in match:
if country not in self.items_tmp:
country = unquote(country).strip("\r\n")
self.items_tmp.append(country)
item = country + "###" + self.url + '\n'
items.append(item)
Expand Down Expand Up @@ -940,9 +942,11 @@ def cat(self):
itemlist = items
# use for search end
for item in items:
name = item.split('###')[0]
name1 = item.split('###')[0]
url = item.split('###')[1]
url = url.replace('%0a', '').replace('%0A', '').strip("\r\n")

name = unquote(name1).strip("\r\n")

self.cat_list.append(show_list(name, url))
# make m3u
nname = '#EXTINF:-1,' + str(name) + '\n'
Expand Down

0 comments on commit 5061e6a

Please sign in to comment.