Fix video filename logic
This commit is contained in:
parent
221c8f6c44
commit
83c87c310d
1 changed files with 3 additions and 1 deletions
|
@ -56,9 +56,11 @@ for submission in reddit.subreddit(str(getenv("REDDIT_SUBREDDIT"))).top(time_fil
|
|||
mastodon.status_post(status_text, visibility="unlisted")
|
||||
# check if reddit video
|
||||
elif "v.redd.it" in submission.url:
|
||||
filename = "video.mp4"
|
||||
|
||||
# download video with highest possible resolution while not exceeding 10MB
|
||||
print("Downloading video post: https://www.reddit.com" + submission.permalink)
|
||||
downloader = Downloader(url="https://www.reddit.com"+submission.permalink, filename="video.mp4", max_s=10_000_000, auto_max=True)
|
||||
downloader = Downloader(url="https://www.reddit.com"+submission.permalink, filename=filename, max_s=10_000_000, auto_max=True)
|
||||
return_val = downloader.download()
|
||||
|
||||
print("\nUploading video")
|
||||
|
|
Loading…
Reference in a new issue