diff --git a/CHANGELOG.md b/CHANGELOG.md index 599bde73..d24b554f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixes - AppImage - upgrade fails when the package was initially imported, but later added to bauh's database [#321](https://github.com/vinifmor/bauh/issues/321) +- Web + - search not working for some typed addresses (e.g: those returning 403) - UI - trying to fix the wrong widgets centralisation issue (random) diff --git a/bauh/gems/web/controller.py b/bauh/gems/web/controller.py index 7c966e03..7e7d8ca3 100644 --- a/bauh/gems/web/controller.py +++ b/bauh/gems/web/controller.py @@ -253,7 +253,7 @@ class WebApplicationManager(SoftwareManager, SettingsController): def _map_url(self, url: str) -> Tuple["BeautifulSoup", requests.Response]: url_res = self._request_url(url) - if url_res: + if url_res is not None and url_res.status_code != 404: return BeautifulSoup(url_res.text, 'lxml', parse_only=SoupStrainer('head')), url_res def search(self, words: str, disk_loader: DiskCacheLoader, limit: int = -1, is_url: bool = False) -> SearchResult: