From dab230b192a2928f02411283e403356732b1d422 Mon Sep 17 00:00:00 2001 From: BrutuZ Date: Mon, 3 May 2021 01:16:20 -0300 Subject: [PATCH] [fix] Handle exception when api_bluray fails to get content (#2468) [fix] api_bluray: Handle exception when fails to get content --- flexget/plugins/internal/api_bluray.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flexget/plugins/internal/api_bluray.py b/flexget/plugins/internal/api_bluray.py index 5b33ff514e..e27dd2521c 100644 --- a/flexget/plugins/internal/api_bluray.py +++ b/flexget/plugins/internal/api_bluray.py @@ -122,7 +122,10 @@ def __init__(self, title: str, year: Optional[int]) -> None: # Used for parsing some more data, sadly with soup self.url = result['url'] - movie_info_response = requests.get(self.url).content + try: + movie_info_response = requests.get(self.url).content + except (requests.RequestException, ConnectionError) as e: + raise LookupError("Couldn't connect to blu-ray.com. %s" % self.url) movie_info = get_soup(movie_info_response)