Merge remote-tracking branch 'origin/master' into heroku-app

This commit is contained in:
Ben Busby 2020-11-28 21:31:17 -05:00
commit b43d5e6aba
No known key found for this signature in database
GPG Key ID: 3B08611DF6E62ED2
2 changed files with 12 additions and 5 deletions

View File

@ -26,7 +26,14 @@
{% if config.dark %}
<link rel="stylesheet" href="/static/css/dark-theme.css"/>
{% endif %}
<title>Whoogle Search</title>
<noscript>
<style>
#main { display: inherit !important; }
.content { max-height: 520px; padding: 18px; border-radius: 10px; }
.collapsible { display: none; }
</style>
</noscript>
<title>Whoogle Search</title>
</head>
<body id="main" style="display: none; background-color: {{ '#000' if config.dark else '#fff' }}">
<div class="search-container">

View File

@ -13,12 +13,12 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAD0lEQVR42m
BLACKLIST = [
'ad', 'anuncio', 'annuncio', 'annonce', 'Anzeige', '广告', '廣告', 'Reklama', 'Реклама', 'Anunț', '광고',
'annons', 'Annonse', 'Iklan', '広告', 'Augl.', 'Mainos', 'Advertentie', 'إعلان', 'Գովազդ', 'विज्ञापन', 'Reklam',
'آگهی', 'Reklāma', 'Reklaam', 'Διαφήμιση', 'מודעה', 'Hirdetés'
'آگهی', 'Reklāma', 'Reklaam', 'Διαφήμιση', 'מודעה', 'Hirdetés', 'Anúncio'
]
SITE_ALTS = {
'twitter.com': 'nitter.net',
'youtube.com': 'invidiou.site',
'youtube.com': 'invidious.snopyta.org',
'instagram.com': 'bibliogram.art/u'
}
@ -43,7 +43,7 @@ def get_site_alt(link: str):
link = link.replace(site_key, SITE_ALTS[site_key])
break
return link
return link.replace('www.', '').replace('//m.', '//')
def filter_link_args(query_link):
@ -76,4 +76,4 @@ def gen_nojs(sibling):
nojs_link['style'] = 'display:block;width:100%;'
nojs_link.string = 'NoJS Link: ' + nojs_link['href']
sibling.append(BeautifulSoup('<br><hr><br>', 'html.parser'))
sibling.append(nojs_link)
sibling.append(nojs_link)