diff --git a/IMDb/plugin.py b/IMDb/plugin.py index 5874f5b..5a3f819 100644 --- a/IMDb/plugin.py +++ b/IMDb/plugin.py @@ -87,24 +87,33 @@ class IMDb(callbacks.Plugin): pattern = re.compile(r"https?://www.imdb.com/title/tt\d+/$") for i in range(1, 3): if google and self.registryValue("google", channel) == i: - results = google.decode(google.search(query, irc.network, channel)) - for r in results: - try: - match = re.search(pattern, r["url"]) - except TypeError: - match = re.search(pattern, r.link) - if match: - log.debug("IMDb: found link using Google search") - break + try: + results = google.decode(google.search(query, irc.network, channel)) + for r in results: + try: + match = re.search(pattern, r["url"]) + except TypeError: + match = re.search(pattern, r.link) + if match: + log.debug("IMDb: found link using Google search") + break + except: + pass elif ddg and self.registryValue("ddg", channel) == i: - results = ddg.search_core( - query, channel_context=channel, max_results=10, show_snippet=False - ) - for r in results: - match = re.search(pattern, r[2]) - if match: - log.debug("IMDb: found link using DDG search") - break + try: + results = ddg.search_core( + query, + channel_context=channel, + max_results=10, + show_snippet=False, + ) + for r in results: + match = re.search(pattern, r[2]) + if match: + log.debug("IMDb: found link using DDG search") + break + except: + pass if match: return match.group(0) else: diff --git a/Lyrics/plugin.py b/Lyrics/plugin.py index 57036cc..40c743d 100644 --- a/Lyrics/plugin.py +++ b/Lyrics/plugin.py @@ -85,7 +85,7 @@ class Lyrics(callbacks.Plugin): log.debug("Lyrics: found link using Google search") break except: - continue + pass elif self.registryValue("ddg", channel) == i: try: results = ddg.search_core( @@ -101,7 +101,7 @@ class Lyrics(callbacks.Plugin): log.debug("Lyrics: found link using DDG") break except: - continue + pass if match and title: return title, match.group(0) else: