Skip to content

Commit

Permalink
mkdir if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
colobas committed Feb 16, 2024
1 parent 899d7a8 commit 4fc0a64
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions process_debates.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ def get_audio_and_video(url, audio_path, headers=None, gdrive_service=None):
m3u8_path = audio_path.with_suffix(".m3u8")
m3u8_orig_path = audio_path.with_suffix(".m3u8.orig")

# mkdir on gdrive in case it doesn't exist
cmd = [
"rclone", "mkdir", f"debates:debates2024/{audio_path.stem}",
]
subprocess.run(cmd, check=True)

if not m3u8_path.exists():
mp4_path = audio_path.with_suffix(".mp4")

Expand Down

0 comments on commit 4fc0a64

Please sign in to comment.