From 4917eab2fc28e30647806420a74bbc8264a922f6 Mon Sep 17 00:00:00 2001 From: limkokhole Date: Thu, 8 Apr 2021 21:17:00 +0800 Subject: [PATCH] Missing one .get() not inside catch --- pinterest-downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pinterest-downloader.py b/pinterest-downloader.py index f35ffdb..6ad8ee9 100644 --- a/pinterest-downloader.py +++ b/pinterest-downloader.py @@ -626,8 +626,8 @@ def download_img(image, save_dir, arg_force_update, IMG_SESSION, V_SESSION, arg_ f.write(chunk) #raise(requests.exceptions.ConnectionError) except (requests.exceptions.ReadTimeout, requests.exceptions.ConnectionError, requests.exceptions.ChunkedEncodingError) as e: - r = IMG_SESSION.get(url, stream=True, timeout=(30, None)) try: + r = IMG_SESSION.get(url, stream=True, timeout=(30, None)) with open(file_path, 'wb') as f: for chunk in r: f.write(chunk)