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")