mirror of
https://github.com/abc1763613206/myiptv.git
synced 2025-12-17 23:34:35 +08:00
feat: check unique
This commit is contained in:
8
main.py
8
main.py
@@ -22,6 +22,8 @@ SKIP_FFPROBE_MESSAGES = [re.compile(pattern) for pattern in (
|
|||||||
'number of reference frames .+ exceeds max',
|
'number of reference frames .+ exceeds max',
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
uniqueList = []
|
||||||
|
|
||||||
@func_set_timeout(12)
|
@func_set_timeout(12)
|
||||||
def get_stream(num, clist, uri):
|
def get_stream(num, clist, uri):
|
||||||
try:
|
try:
|
||||||
@@ -98,7 +100,11 @@ def main():
|
|||||||
print('Channel,Group,Source,Link', file=f0)
|
print('Channel,Group,Source,Link', file=f0)
|
||||||
for row in f_csv:
|
for row in f_csv:
|
||||||
try:
|
try:
|
||||||
ret = check_channel(row,num)
|
if row[3] in uniqueList:
|
||||||
|
ret = False
|
||||||
|
else:
|
||||||
|
uniqueList.append(row[3])
|
||||||
|
ret = check_channel(row,num)
|
||||||
except FunctionTimedOut as e:
|
except FunctionTimedOut as e:
|
||||||
#traceback.print_exc()
|
#traceback.print_exc()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user