Compare commits

...

10 Commits

Author SHA1 Message Date
Ben Busby 466cb63d0e
Bump version to 0.9.0 2024-09-30 12:18:09 -06:00
Ben Busby c056322037
Use `.lower()` when accessing the cache busting map
Cache busted resources will always have a lowercase name. For some
reason, a user encountered a capitalized css file name in #1142. This
isn't present anywhere in the Whoogle repo, but could be a byproduct of
some self-hosting configuration. Either way, the key used should always
be lowercase.

Fixes #1142
2024-09-30 12:00:52 -06:00
Ben Busby 5eb609d0b2
Hide line below search bar in dark themes
The results return an empty div with a background color set (not sure
why, not generated on Whoogle's side). This unsets the background color
so that at least it isn't visible.
2024-09-30 11:57:12 -06:00
Ben Busby a016a1bcf4
Use raw string for matching regex in results.py
Fixes #1144
2024-09-30 11:41:13 -06:00
Ben Busby 6924f5ce0d
Update ad filter keyword for Dutch language
Fixes #1172
2024-09-30 11:33:50 -06:00
Ben Busby 6abe5511f4
Update ad filter keyword for Korean language
Fixes #1162
2024-09-30 11:32:29 -06:00
xatier 9d7ab1e2f8
ci: update GitHub actions (#1155) 2024-09-30 11:22:42 -06:00
dependabot[bot] 441ce72527
Bump idna from 3.4 to 3.7 (#1137)
Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 11:18:24 -06:00
Andrew 58d54c6384
Update ad filter for Czech language (#1141) 2024-09-30 11:12:37 -06:00
dependabot[bot] add9313a99
Bump werkzeug from 3.0.1 to 3.0.3 (#1150)
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.1 to 3.0.3.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.0.1...3.0.3)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 11:12:04 -06:00
10 changed files with 77 additions and 68 deletions

View File

@ -10,59 +10,58 @@ jobs:
name: Build and publish to TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
setuptools
--user
- name: Set dev timestamp
run: echo "DEV_BUILD=$(date +%s)" >> $GITHUB_ENV
- name: Build binary wheel and source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
setuptools
--user
- name: Set dev timestamp
run: echo "DEV_BUILD=$(date +%s)" >> $GITHUB_ENV
- name: Build binary wheel and source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build binary wheel and source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build binary wheel and source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}

View File

@ -6,12 +6,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: pip install --upgrade pip && pip install -r requirements.txt
- name: Run tests
run: ./run test
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: pip install --upgrade pip && pip install -r requirements.txt
- name: Run tests
run: ./run test

View File

@ -176,7 +176,7 @@ for cb_dir in cache_busting_dirs:
# Templating functions
app.jinja_env.globals.update(clean_query=clean_query)
app.jinja_env.globals.update(
cb_url=lambda f: app.config['CACHE_BUSTING_MAP'][f])
cb_url=lambda f: app.config['CACHE_BUSTING_MAP'][f.lower()])
# Attempt to acquire tor identity, to determine if Tor config is available
send_tor_signal(Signal.HEARTBEAT)

View File

@ -15,6 +15,7 @@ class GClasses:
result_class_a = 'ZINbbc'
result_class_b = 'luh4td'
scroller_class = 'idg8be'
line_tag = 'BsXmcf'
result_classes = {
result_class_a: ['Gx5Zad'],

View File

@ -70,6 +70,10 @@ select {
border-radius: 8px !important;
}
.BsXmcf {
background-color: unset !important;
}
.KP7LCb {
box-shadow: 0 0 0 0 !important;
}

View File

@ -45,6 +45,10 @@ select {
box-shadow: 0 1px 6px rgba(32,33,36,0.28) !important;
}
.BsXmcf {
background-color: unset !important;
}
.BVG0Nb {
background-color: var(--whoogle-result-bg) !important;
}

View File

@ -27,7 +27,8 @@ BLACKLIST = [
'Reklama', 'Реклама', 'Anunț', '광고', 'annons', 'Annonse', 'Iklan',
'広告', 'Augl.', 'Mainos', 'Advertentie', 'إعلان', 'Գովազդ', 'विज्ञापन',
'Reklam', 'آگهی', 'Reklāma', 'Reklaam', 'Διαφήμιση', 'מודעה', 'Hirdetés',
'Anúncio', 'Quảng cáo','โฆษณา', 'sponsored', 'patrocinado', 'gesponsert'
'Anúncio', 'Quảng cáo', 'โฆษณา', 'sponsored', 'patrocinado', 'gesponsert',
'Sponzorováno', '스폰서', 'Gesponsord'
]
SITE_ALTS = {
@ -98,7 +99,7 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup:
else:
reg_pattern = fr'\b((?![{{}}<>-]){target_word}(?![{{}}<>-]))\b'
if re.match('.*[@_!#$%^&*()<>?/\|}{~:].*', target_word) or (
if re.match(r'.*[@_!#$%^&*()<>?/\|}{~:].*', target_word) or (
element.parent and element.parent.name == 'style'):
return

View File

@ -4,4 +4,4 @@ optional_dev_tag = ''
if os.getenv('DEV_BUILD'):
optional_dev_tag = '.dev' + os.getenv('DEV_BUILD')
__version__ = '0.8.4' + optional_dev_tag
__version__ = '0.9.0' + optional_dev_tag

View File

@ -3,7 +3,7 @@ name: whoogle
description: A self hosted search engine on Kubernetes
type: application
version: 0.1.0
appVersion: 0.8.4
appVersion: 0.9.0
icon: https://github.com/benbusby/whoogle-search/raw/main/app/static/img/favicon/favicon-96x96.png

View File

@ -11,7 +11,7 @@ cryptography==43.0.1; platform_machine != 'armv7l'
cssutils==2.6.0
defusedxml==0.7.1
Flask==2.3.2
idna==3.4
idna==3.7
itsdangerous==2.1.2
Jinja2==3.1.4
MarkupSafe==2.1.2
@ -33,5 +33,5 @@ urllib3==1.26.19
validators==0.22.0
waitress==2.1.2
wcwidth==0.2.6
Werkzeug==3.0.1
Werkzeug==3.0.3
python-dotenv==0.21.1