diff --git a/app/filter.py b/app/filter.py index c15ee42..9d41837 100644 --- a/app/filter.py +++ b/app/filter.py @@ -52,9 +52,11 @@ class Filter: logo['style'] = 'display:flex; justify-content:center; align-items:center; color:#685e79; font-size:18px;' # Fix search bar length on mobile - if self.mobile: + try: search_bar = soup.find('header').find('form').find('div') search_bar['style'] = 'width: 100%;' + except AttributeError: + pass # Replace hrefs with only the intended destination (no "utm" type tags) for a in soup.find_all('a', href=True):