'commit'
This commit is contained in:
20
DouYin/find_bad_url.py
Normal file
20
DouYin/find_bad_url.py
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
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")
|
||||
Reference in New Issue
Block a user