修正格式化名称功能,更新列表

This commit is contained in:
EvilCult 2019-06-06 00:28:56 +08:00 committed by GitHub
commit 3b343a6427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 368 additions and 257 deletions

View File

@ -33,10 +33,10 @@ class Iptv (object):
for item in urlList :
self.addData(item)
# Dotpy = dotpy.Source()
# urlList = Dotpy.getSource()
# for item in urlList :
# self.addData(item)
Dotpy = dotpy.Source()
urlList = Dotpy.getSource()
for item in urlList :
self.addData(item)
self.outPut()
self.outJson()

View File

@ -32,15 +32,14 @@ class Source (object) :
i = 1
total = len(sourceList)
for item in sourceList :
print('Checking[ %s / %s ]: %s' % (i, total, str(item[0])))
info = self.T.fmtTitle(item[0])
print('Checking[ %s / %s ]: %s' % (i, total, str(info['id']) + str(info['title'])))
i = i + 1
netstat = self.T.chkPlayable(item[1])
if netstat > 0 :
cros = 1 if self.T.chkCros(item[1]) else 0
info = self.T.fmtTitle(item[0])
data = {
'title' : str(info['id']) if info['id'] != '' else str(info['title']),
'url' : str(item[1]),

View File

@ -22,14 +22,13 @@ class Source (object) :
line = lines[i].strip('\n')
item = line.split(',', 1)
print('Checking[ %s / %s ]: %s' % (i, total, str(item[0])))
info = self.T.fmtTitle(item[0])
print('Checking[ %s / %s ]: %s' % (i, total, str(info['id']) + str(info['title'])))
netstat = self.T.chkPlayable(item[1])
if netstat > 0 :
cros = 1 if self.T.chkCros(item[1]) else 0
info = self.T.fmtTitle(item[0])
data = {
'title' : str(info['id']) if info['id'] != '' else str(info['title']),
'url' : str(item[1]),

View File

@ -30,14 +30,13 @@ class Source (object) :
i = 1
total = len(sourceList)
for item in sourceList :
print('Checking[ %s / %s ]: %s' % (i, total, str(item[0])))
info = self.T.fmtTitle(item[0])
print('Checking[ %s / %s ]: %s' % (i, total, str(info['id']) + str(info['title'])))
netstat = self.T.chkPlayable(item[1])
i = i + 1
if netstat > 0 :
cros = 1 if self.T.chkCros(item[1]) else 0
info = self.T.fmtTitle(item[0])
data = {
'title' : str(info['id']) if info['id'] != '' else str(info['title']),
'url' : str(item[1]),

View File

@ -42,15 +42,14 @@ class Source (object) :
i = 1
total = len(sourceList)
for item in sourceList :
print('Checking[ %s / %s ]: %s' % (i, total, str(item[0])))
info = self.T.fmtTitle(item[0])
print('Checking[ %s / %s ]: %s' % (i, total, str(info['id']) + str(info['title'])))
i = i + 1
netstat = self.T.chkPlayable(item[1])
if netstat > 0 :
cros = 1 if self.T.chkCros(item[1]) else 0
info = self.T.fmtTitle(item[0])
data = {
'title' : str(info['id']) if info['id'] != '' else str(info['title']),
'url' : str(item[1]),

View File

@ -98,6 +98,9 @@ class Tools (object) :
channeTitle = channeTitle.replace('.m3u8', '')
pattern = re.compile(r"<.*?>", re.I)
channeTitle = re.sub(pattern, "", channeTitle)
pattern = re.compile(r"(fhd|hd|sd)", re.I)
tmp = pattern.findall(channeTitle)
quality = ''

File diff suppressed because one or more lines are too long

584
tv.m3u8

File diff suppressed because it is too large Load Diff