16 lines
496 B
Python
16 lines
496 B
Python
|
|
import os
|
|
|
|
def check_headers(directory):
|
|
for filename in os.listdir(directory):
|
|
if filename.endswith(".mp4"):
|
|
filepath = os.path.join(directory, filename)
|
|
try:
|
|
with open(filepath, "rb") as f:
|
|
header = f.read(16)
|
|
print(f"{filename[:30]}... : {header}")
|
|
except Exception as e:
|
|
print(f"Error reading {filename}: {e}")
|
|
|
|
check_headers(r"d:\dsWork\aiData\DouYin\DownloadedVideos")
|