aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbunkr_dl8
1 files changed, 7 insertions, 1 deletions
diff --git a/bunkr_dl b/bunkr_dl
index 3614745..ef2fa49 100755
--- a/bunkr_dl
+++ b/bunkr_dl
@@ -20,6 +20,7 @@ import requests
from bs4 import BeautifulSoup
import re
import os
+import sys
import argparse
import time
from urllib.parse import urljoin, urlparse, quote
@@ -273,4 +274,9 @@ def main():
process_album(url, save_directory)
if __name__ == "__main__":
- main()
+ try:
+ main()
+ except KeyboardInterrupt:
+ # Partial file stays on disk; rerunning the same command resumes it
+ print("\nInterrupted. Rerun the same command to resume.")
+ sys.exit(130)