diff options
| -rwxr-xr-x | bunkr_dl | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) |
