This commit is contained in:
abc1763613206
2021-02-18 00:21:01 +08:00
parent aa7600d538
commit 02d1ca8273
10 changed files with 228 additions and 58 deletions

View File

@@ -25,7 +25,7 @@ SKIP_FFPROBE_MESSAGES = [re.compile(pattern) for pattern in (
uniqueList = []
@func_set_timeout(12)
@func_set_timeout(16)
def get_stream(num, clist, uri):
try:
ffprobe = FFprobe(inputs={uri: '-v error -show_format -show_streams -print_format json'})
@@ -40,7 +40,7 @@ def check_channel(clist,num):
# clist 为一行 csv
uri = clist[3]
try:
r = requests.get(clist[3], timeout=2) # 先测能不能正常访问
r = requests.get(clist[3], timeout=5) # 先测能不能正常访问
if(r.status_code == requests.codes.ok):
#ffprobe = FFprobe(inputs={uri: '-v warning'})
#errors = tuple(filter(
@@ -144,7 +144,7 @@ def main():
print('{},{},{},{}'.format(row[0],row[1],row[2],row[3]), file=f0)
Total = Total + 1
num = num + 1
time.sleep(0.3)
time.sleep(1)
print('Total: {}'.format(Total))
if __name__ == '__main__':
main()