生成新m3u文件

This commit is contained in:
EvilCult 2019-05-29 18:15:30 +08:00
parent 135dd57c2f
commit 7ae680b64d
3 changed files with 441 additions and 426 deletions

View File

@ -54,7 +54,7 @@ class Iptv (object):
def outPut (self) :
sql = """SELECT * FROM
(SELECT * FROM %s WHERE online = 1 ORDER BY delay DESC) AS delay
GROUP BY delay.title
GROUP BY LOWER(delay.title)
HAVING delay.title != '' and delay.title != 'CCTV-' AND delay.delay < 500
ORDER BY level ASC, length(title) ASC, title ASC
""" % (self.DB.table)
@ -78,9 +78,9 @@ class Iptv (object):
f.write("#EXTINF:-1, group-title=\"%s\", %s\n" % (className, item[1]))
f.write("%s\n" % (item[3]))
obj = Iptv()
obj.run()
if __name__ == '__main__':
obj = Iptv()
obj.run()

View File

@ -121,7 +121,6 @@ class Tools (object) :
pattern = re.compile(r"\[\d+\*\d+\]", re.I)
result['title'] = re.sub(pattern, "", result['title'])
result['title'] = result['title'].title()
Area = area.Area()
result['level'] = Area.classify(str(result['id']) + str(result['title']))

858
tv.m3u8

File diff suppressed because it is too large Load Diff