mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-18 08:06:46 +01:00
Update media_scrapper.py
This commit is contained in:
@@ -463,9 +463,9 @@ def TikTokDownload(cookies, headers, data, name, path) -> str:
|
|||||||
if i.startswith("href=")][0]
|
if i.startswith("href=")][0]
|
||||||
|
|
||||||
response = requests.get(parsed_link[6:-10])
|
response = requests.get(parsed_link[6:-10])
|
||||||
with open(path + "tiktok" + name + ".mp4", "wb") as f:
|
with open(path + "\\" + name + ".mp4", "wb") as f:
|
||||||
f.write(response.content)
|
f.write(response.content)
|
||||||
return path + "tiktok" + name + ".mp4"
|
return path + "\\" + name + ".mp4"
|
||||||
|
|
||||||
|
|
||||||
def TiktokDownloadAll(linkList, path) -> str:
|
def TiktokDownloadAll(linkList, path) -> str:
|
||||||
@@ -475,7 +475,7 @@ def TiktokDownloadAll(linkList, path) -> str:
|
|||||||
for i in linkList:
|
for i in linkList:
|
||||||
try:
|
try:
|
||||||
data['url'] = i
|
data['url'] = i
|
||||||
result = TikTokDownload(cookies, headers, data, str(linkList.index(i)), path)
|
result = TikTokDownload(cookies, headers, data, "tiktok", path) # str(linkList.index(i))
|
||||||
return result
|
return result
|
||||||
except IndexError:
|
except IndexError:
|
||||||
parseDict = getDict()
|
parseDict = getDict()
|
||||||
|
|||||||
Reference in New Issue
Block a user