response = requests.get(args.url) with open(args.output, 'wb') as f: f.write(response.content) print(f"Saved to {args.output}") if == " main ": main()
args = parser.parse_args()
Run with: