소스 검색

Update organise-videos.py

Get the username(s) from the downloaded video files and create a folder for each username (folder name = username). Then move the video(s) into their associated folder(s).
BassThatHertz 6 년 전
부모
커밋
5dd1e43364
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      organise-videos.py

+ 1 - 2
organise-videos.py

@@ -41,7 +41,6 @@ for username in usernames:
 # Move the videos into the folders
 for filename, username in filenames_to_usernames.items():
     shutil.move(filename, username)
-    # Can also do os.rename(filename, '{}/{}'.format(username, filename))
 
 num_videos_moved = len(filenames_to_usernames.keys())
-print("{} videos moved successfully.".format(num_videos_moved))
+print("{} videos moved successfully.".format(num_videos_moved))