Compare commits
No commits in common. "466cb63d0e5235364249cd6b83431ef8b5c82444" and "436233f71853f4911114cba8d685de50e9fb254c" have entirely different histories.
466cb63d0e
...
436233f718
|
@ -10,58 +10,59 @@ jobs:
|
||||||
name: Build and publish to TestPyPI
|
name: Build and publish to TestPyPI
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python 3.9
|
- name: Set up Python 3.9
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
- name: Install pypa/build
|
- name: Install pypa/build
|
||||||
run: >-
|
run: >-
|
||||||
python -m
|
python -m
|
||||||
pip install
|
pip install
|
||||||
build
|
build
|
||||||
setuptools
|
setuptools
|
||||||
--user
|
--user
|
||||||
- name: Set dev timestamp
|
- name: Set dev timestamp
|
||||||
run: echo "DEV_BUILD=$(date +%s)" >> $GITHUB_ENV
|
run: echo "DEV_BUILD=$(date +%s)" >> $GITHUB_ENV
|
||||||
- name: Build binary wheel and source tarball
|
- name: Build binary wheel and source tarball
|
||||||
run: >-
|
run: >-
|
||||||
python -m
|
python -m
|
||||||
build
|
build
|
||||||
--sdist
|
--sdist
|
||||||
--wheel
|
--wheel
|
||||||
--outdir dist/
|
--outdir dist/
|
||||||
.
|
.
|
||||||
- name: Publish distribution to TestPyPI
|
- name: Publish distribution to TestPyPI
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||||
repository_url: https://test.pypi.org/legacy/
|
repository_url: https://test.pypi.org/legacy/
|
||||||
publish:
|
publish:
|
||||||
name: Build and publish to PyPI
|
name: Build and publish to PyPI
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python 3.9
|
- name: Set up Python 3.9
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
- name: Install pypa/build
|
- name: Install pypa/build
|
||||||
run: >-
|
run: >-
|
||||||
python -m
|
python -m
|
||||||
pip install
|
pip install
|
||||||
build
|
build
|
||||||
--user
|
--user
|
||||||
- name: Build binary wheel and source tarball
|
- name: Build binary wheel and source tarball
|
||||||
run: >-
|
run: >-
|
||||||
python -m
|
python -m
|
||||||
build
|
build
|
||||||
--sdist
|
--sdist
|
||||||
--wheel
|
--wheel
|
||||||
--outdir dist/
|
--outdir dist/
|
||||||
.
|
.
|
||||||
- name: Publish distribution to PyPI
|
- name: Publish distribution to PyPI
|
||||||
if: startsWith(github.ref, 'refs/tags')
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,12 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install --upgrade pip && pip install -r requirements.txt
|
run: pip install --upgrade pip && pip install -r requirements.txt
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ./run test
|
run: ./run test
|
||||||
|
|
|
@ -176,7 +176,7 @@ for cb_dir in cache_busting_dirs:
|
||||||
# Templating functions
|
# Templating functions
|
||||||
app.jinja_env.globals.update(clean_query=clean_query)
|
app.jinja_env.globals.update(clean_query=clean_query)
|
||||||
app.jinja_env.globals.update(
|
app.jinja_env.globals.update(
|
||||||
cb_url=lambda f: app.config['CACHE_BUSTING_MAP'][f.lower()])
|
cb_url=lambda f: app.config['CACHE_BUSTING_MAP'][f])
|
||||||
|
|
||||||
# Attempt to acquire tor identity, to determine if Tor config is available
|
# Attempt to acquire tor identity, to determine if Tor config is available
|
||||||
send_tor_signal(Signal.HEARTBEAT)
|
send_tor_signal(Signal.HEARTBEAT)
|
||||||
|
|
|
@ -15,7 +15,6 @@ class GClasses:
|
||||||
result_class_a = 'ZINbbc'
|
result_class_a = 'ZINbbc'
|
||||||
result_class_b = 'luh4td'
|
result_class_b = 'luh4td'
|
||||||
scroller_class = 'idg8be'
|
scroller_class = 'idg8be'
|
||||||
line_tag = 'BsXmcf'
|
|
||||||
|
|
||||||
result_classes = {
|
result_classes = {
|
||||||
result_class_a: ['Gx5Zad'],
|
result_class_a: ['Gx5Zad'],
|
||||||
|
|
|
@ -70,10 +70,6 @@ select {
|
||||||
border-radius: 8px !important;
|
border-radius: 8px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.BsXmcf {
|
|
||||||
background-color: unset !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.KP7LCb {
|
.KP7LCb {
|
||||||
box-shadow: 0 0 0 0 !important;
|
box-shadow: 0 0 0 0 !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,10 +45,6 @@ select {
|
||||||
box-shadow: 0 1px 6px rgba(32,33,36,0.28) !important;
|
box-shadow: 0 1px 6px rgba(32,33,36,0.28) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.BsXmcf {
|
|
||||||
background-color: unset !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.BVG0Nb {
|
.BVG0Nb {
|
||||||
background-color: var(--whoogle-result-bg) !important;
|
background-color: var(--whoogle-result-bg) !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,7 @@ BLACKLIST = [
|
||||||
'Reklama', 'Реклама', 'Anunț', '광고', 'annons', 'Annonse', 'Iklan',
|
'Reklama', 'Реклама', 'Anunț', '광고', 'annons', 'Annonse', 'Iklan',
|
||||||
'広告', 'Augl.', 'Mainos', 'Advertentie', 'إعلان', 'Գովազդ', 'विज्ञापन',
|
'広告', 'Augl.', 'Mainos', 'Advertentie', 'إعلان', 'Գովազդ', 'विज्ञापन',
|
||||||
'Reklam', 'آگهی', 'Reklāma', 'Reklaam', 'Διαφήμιση', 'מודעה', 'Hirdetés',
|
'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 = {
|
SITE_ALTS = {
|
||||||
|
@ -99,7 +98,7 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup:
|
||||||
else:
|
else:
|
||||||
reg_pattern = fr'\b((?![{{}}<>-]){target_word}(?![{{}}<>-]))\b'
|
reg_pattern = fr'\b((?![{{}}<>-]){target_word}(?![{{}}<>-]))\b'
|
||||||
|
|
||||||
if re.match(r'.*[@_!#$%^&*()<>?/\|}{~:].*', target_word) or (
|
if re.match('.*[@_!#$%^&*()<>?/\|}{~:].*', target_word) or (
|
||||||
element.parent and element.parent.name == 'style'):
|
element.parent and element.parent.name == 'style'):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,4 @@ optional_dev_tag = ''
|
||||||
if os.getenv('DEV_BUILD'):
|
if os.getenv('DEV_BUILD'):
|
||||||
optional_dev_tag = '.dev' + os.getenv('DEV_BUILD')
|
optional_dev_tag = '.dev' + os.getenv('DEV_BUILD')
|
||||||
|
|
||||||
__version__ = '0.9.0' + optional_dev_tag
|
__version__ = '0.8.4' + optional_dev_tag
|
||||||
|
|
|
@ -3,7 +3,7 @@ name: whoogle
|
||||||
description: A self hosted search engine on Kubernetes
|
description: A self hosted search engine on Kubernetes
|
||||||
type: application
|
type: application
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
appVersion: 0.9.0
|
appVersion: 0.8.4
|
||||||
|
|
||||||
icon: https://github.com/benbusby/whoogle-search/raw/main/app/static/img/favicon/favicon-96x96.png
|
icon: https://github.com/benbusby/whoogle-search/raw/main/app/static/img/favicon/favicon-96x96.png
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ cryptography==43.0.1; platform_machine != 'armv7l'
|
||||||
cssutils==2.6.0
|
cssutils==2.6.0
|
||||||
defusedxml==0.7.1
|
defusedxml==0.7.1
|
||||||
Flask==2.3.2
|
Flask==2.3.2
|
||||||
idna==3.7
|
idna==3.4
|
||||||
itsdangerous==2.1.2
|
itsdangerous==2.1.2
|
||||||
Jinja2==3.1.4
|
Jinja2==3.1.4
|
||||||
MarkupSafe==2.1.2
|
MarkupSafe==2.1.2
|
||||||
|
@ -33,5 +33,5 @@ urllib3==1.26.19
|
||||||
validators==0.22.0
|
validators==0.22.0
|
||||||
waitress==2.1.2
|
waitress==2.1.2
|
||||||
wcwidth==0.2.6
|
wcwidth==0.2.6
|
||||||
Werkzeug==3.0.3
|
Werkzeug==3.0.1
|
||||||
python-dotenv==0.21.1
|
python-dotenv==0.21.1
|
||||||
|
|
Loading…
Reference in New Issue