Update media_scrapper.py

This commit is contained in:
Believethehype
2023-12-12 10:29:47 +01:00
parent d822e396f4
commit 2358434ff7

View File

@@ -493,14 +493,14 @@ def InstagramDownload(url, name, path) -> str:
print(video_url) print(video_url)
if video_url: if video_url:
response = requests.get(video_url) response = requests.get(video_url)
with open(path + "insta" + name + ".mp4", "wb") as f: with open(path + "/" + name + ".mp4", "wb") as f:
f.write(response.content) f.write(response.content)
return path + "insta" + name + ".mp4" return path + "/" + name + ".mp4"
elif photo_url: elif photo_url:
response = requests.get(photo_url) response = requests.get(photo_url)
with open(path + "insta" + name + ".jpg", "wb") as f: with open(path + name + "/" + ".jpg", "wb") as f:
f.write(response.content) f.write(response.content)
return path + "insta" + name + ".jpg" return path + "/" + name + ".jpg"
def InstagramDownloadAll(linklist, path) -> str: def InstagramDownloadAll(linklist, path) -> str: