Files
aiData/DouYin/find_bad_url.py
HuangHai f2f7a38210 'commit'
2026-01-20 19:06:36 +08:00

21 lines
685 B
Python

import hashlib
def find_url(target_hash):
with open(r"d:\dsWork\aiData\DouYin\Url.txt", "r", encoding="utf-8") as f:
for line in f:
line = line.strip()
if not line: continue
# Extract URL same as in VideoDownloader
import re
match = re.search(r'(https?://v\.douyin\.com/[a-zA-Z0-9\-_]+/?|https?://www\.douyin\.com/[^\s]+)', line)
if match:
url = match.group(0)
url_hash = hashlib.md5(url.encode()).hexdigest()[:8]
if url_hash == target_hash:
print(f"Found URL: {url}")
return
find_url("5ae04852")