[web] fix: search not working for some typed addresses

This commit is contained in:
Vinicius Moreira
2023-12-01 14:51:08 -03:00
parent d47e55fd7e
commit 27f49828da
2 changed files with 3 additions and 1 deletions

View File

@@ -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)

View File

@@ -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: