re-enable upload to litterbox
This commit is contained in:
parent
d9968bd500
commit
1399ebca7b
2 changed files with 5 additions and 6 deletions
|
|
@ -36,12 +36,12 @@ class YoutubeDL(BotBaseCog):
|
||||||
stdout, stderr = process.communicate()
|
stdout, stderr = process.communicate()
|
||||||
|
|
||||||
# Send the output back to the user
|
# Send the output back to the user
|
||||||
await ctx.send(f"std out: {stdout.decode('utf-8')}") if stdout else await ctx.send("No stdout output")
|
#await ctx.send(f"std out: {stdout.decode('utf-8')}") if stdout else await ctx.send("No stdout output")
|
||||||
await ctx.send(f"std err: {stderr.decode('utf-8')}") if stderr else await ctx.send("No stderr output")
|
#await ctx.send(f"std err: {stderr.decode('utf-8')}") if stderr else await ctx.send("No stderr output")
|
||||||
await ctx.send(f"Downloading {video_or_audio} from {url}...", suppress_embeds=True)
|
await ctx.send(f"Downloading {video_or_audio} from {url}...", suppress_embeds=True)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await ctx.send(f"Error: {e}")
|
#await ctx.send(f"Error: {e}")
|
||||||
await ctx.send("Usage: !youtubedl <url> <video|audio>")
|
await ctx.send("Usage: !youtubedl <url> <video|audio>")
|
||||||
|
|
||||||
#create a task
|
#create a task
|
||||||
|
|
@ -52,7 +52,7 @@ class YoutubeDL(BotBaseCog):
|
||||||
with open(f"data/ytdl/{file}", "r") as f:
|
with open(f"data/ytdl/{file}", "r") as f:
|
||||||
url = f.read()
|
url = f.read()
|
||||||
await self.bot.get_channel(544408659174883328).send(f"{url}")
|
await self.bot.get_channel(544408659174883328).send(f"{url}")
|
||||||
#os.remove(f"data/ytdl/{file}")
|
os.remove(f"data/ytdl/{file}")
|
||||||
|
|
||||||
async def setup(bot):
|
async def setup(bot):
|
||||||
await bot.add_cog(YoutubeDL(bot))
|
await bot.add_cog(YoutubeDL(bot))
|
||||||
|
|
@ -42,8 +42,7 @@ def main():
|
||||||
print(url, video_or_audio)
|
print(url, video_or_audio)
|
||||||
if download(url, video_or_audio):
|
if download(url, video_or_audio):
|
||||||
zip_file = zip_all_files()
|
zip_file = zip_all_files()
|
||||||
#output_url = upload_to_litterbox(zip_file)
|
output_url = upload_to_litterbox(zip_file)
|
||||||
output_url = "test_url"
|
|
||||||
print(output_url)
|
print(output_url)
|
||||||
with open(f"{time.time()}.txt", "w") as output_file:
|
with open(f"{time.time()}.txt", "w") as output_file:
|
||||||
output_file.write(output_url)
|
output_file.write(output_url)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue