Skip to content

Commit

Permalink
[fix] Handle exception when api_bluray fails to get content (#2468)
Browse files Browse the repository at this point in the history
[fix] api_bluray: Handle exception when fails to get content
  • Loading branch information
BrutuZ committed May 3, 2021
1 parent db85ce1 commit dab230b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flexget/plugins/internal/api_bluray.py
Expand Up @@ -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)

Expand Down

0 comments on commit dab230b

Please sign in to comment.