Compare commits

...

16 Commits
v0.9.3 ... main

Author SHA1 Message Date
Don
418d9df89c
Merge pull request #1242 from benbusby/dependabot/pip/jinja2-3.1.6
Bump jinja2 from 3.1.5 to 3.1.6
2025-09-20 16:45:25 -05:00
Don
3733d87546
Merge pull request #1243 from benbusby/dependabot/pip/cryptography-45.0.7
Bump cryptography from 3.3.2 to 45.0.7
2025-09-20 16:44:29 -05:00
Don
6782413560
Update requirements.txt 2025-09-20 16:24:20 -05:00
Don
1c1dcfc270
Update requirements.txt
Fixed dependency issues
2025-09-20 16:22:19 -05:00
Don
ba757b64e8
Update stale.yml 2025-09-15 08:31:29 -05:00
dependabot[bot]
3476367ee1
Bump cryptography from 3.3.2 to 44.0.1
Bumps [cryptography](https://github.com/pyca/cryptography) from 3.3.2 to 44.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/3.3.2...44.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 44.0.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-14 15:00:08 +00:00
dependabot[bot]
7ce8c0b216
Bump jinja2 from 3.1.5 to 3.1.6
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-version: 3.1.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-14 14:59:53 +00:00
Don
e24f2d751c
Create stale.yml
Setup automation to close stale issues to discover what is actually still an issue.
2025-09-14 09:59:04 -05:00
Don
ec9e7877b6
Merge pull request #1228 from tunazorlu/turkishtranslation
LGTM
2025-09-14 08:23:01 -05:00
Don
c70497d532
Update countries.json
Macedonia is now North Macedonia
2025-09-14 08:06:52 -05:00
Don
69d1ddae0c
Updated UI Config to respect User Agent in ENV file if exists (#1240)
* Updated UI Config to respect User Agent in ENV file if exists

* Updated version number
2025-09-12 19:24:44 -06:00
Yaşar Tuna Zorlu
339eb61cea Turkish Language Translation Update
-Turkish translation added,
-"Turkish language name" in turkish is "Türkçe" so fixed it on languages.json
-Turkey's name changed into Türkiye in 2022 as stated in United Nations (please refer to the UN related webpage: https://bit.ly/turkiyeofficialname). And the order in the language list has also been adjusted so that the letter u is followed by the letter ü when listing Türkiye.
e4cabe
2025-05-03 11:49:05 +03:00
Tingyu
e4cabe3e5b
Add public instance [skip ci] (#1224)
Adds https://whoogle.4040940.xyz as a public instance

---------

Co-authored-by: Ben Busby <contact@benbusby.com>
2025-03-10 11:57:27 -06:00
Ben Busby
f25611cbcb
Add 4get as an option for continuing search
Closes #1222
2025-02-25 15:53:46 -07:00
Asmodeus
97502de606
Remove dead instances [skip ci] (#1223)
Removes dead instances from readme and instances txt file

---------

Co-authored-by: Ben Busby <contact@benbusby.com>
2025-02-25 15:29:13 -07:00
Ben Busby
1339c49dc5
Temporarily disable full size image search
The reliance on non-mobile user agents breaks the full size image search
config option, leading to empty image search result pages
2025-01-29 10:50:27 -07:00
16 changed files with 175 additions and 65 deletions

33
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,33 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests
on:
schedule:
- cron: '35 10 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v10
with:
days-before-stale: 90
days-before-close: 7
stale-issue-message: 'This issue has been automatically marked as stale due to inactivity. If it is still valid please comment within 7 days or it will be auto-closed.'
close-issue-message: 'Closing this issue due to prolonged inactivity.'
# Disabled PR Closing for now, but pre-staged the settings
days-before-pr-stale: -1
days-before-pr-close: -1
operations-per-run: 100
stale-pr-message: "This PR appears to be stale. If it is still valid please comment within 14 days or it will be auto-closed."
close-pr-message: "This PR was closed as stale."
exempt-issue-labels: 'keep-open,enhancement,critical,dependencies,documentation'

View File

@ -699,27 +699,13 @@ A lot of the app currently piggybacks on Google's existing support for fetching
| Website | Country | Language | Cloudflare |
|-|-|-|-|
| [https://search.albony.xyz](https://search.albony.xyz/) | 🇮🇳 IN | Multi-choice | |
| [https://search.garudalinux.org](https://search.garudalinux.org) | 🇫🇮 FI | Multi-choice | ✅ |
| [https://search.dr460nf1r3.org](https://search.dr460nf1r3.org) | 🇩🇪 DE | Multi-choice | ✅ |
| [https://s.tokhmi.xyz](https://s.tokhmi.xyz) | 🇺🇸 US | Multi-choice | ✅ |
| [https://search.sethforprivacy.com](https://search.sethforprivacy.com) | 🇩🇪 DE | English | |
| [https://whoogle.dcs0.hu](https://whoogle.dcs0.hu) | 🇭🇺 HU | Multi-choice | |
| [https://gowogle.voring.me](https://gowogle.voring.me) | 🇺🇸 US | Multi-choice | |
| [https://whoogle.privacydev.net](https://whoogle.privacydev.net) | 🇫🇷 FR | English | |
| [https://wg.vern.cc](https://wg.vern.cc) | 🇺🇸 US | English | |
| [https://whoogle.hxvy0.gq](https://whoogle.hxvy0.gq) | 🇨🇦 CA | Turkish Only | ✅ |
| [https://whoogle.hostux.net](https://whoogle.hostux.net) | 🇫🇷 FR | Multi-choice | |
| [https://whoogle.lunar.icu](https://whoogle.lunar.icu) | 🇩🇪 DE | Multi-choice | ✅ |
| [https://wgl.frail.duckdns.org](https://wgl.frail.duckdns.org) | 🇧🇷 BR | Multi-choice | |
| [https://whoogle.no-logs.com](https://whoogle.no-logs.com/) | 🇸🇪 SE | Multi-choice | |
| [https://whoogle.ftw.lol](https://whoogle.ftw.lol) | 🇩🇪 DE | Multi-choice | |
| [https://whoogle-search--replitcomreside.repl.co](https://whoogle-search--replitcomreside.repl.co) | 🇺🇸 US | English | |
| [https://search.notrustverify.ch](https://search.notrustverify.ch) | 🇨🇭 CH | Multi-choice | |
| [https://whoogle.datura.network](https://whoogle.datura.network) | 🇩🇪 DE | Multi-choice | |
| [https://whoogle.yepserver.xyz](https://whoogle.yepserver.xyz) | 🇺🇦 UA | Multi-choice | |
| [https://search.nezumi.party](https://search.nezumi.party) | 🇮🇹 IT | Multi-choice | |
| [https://search.snine.nl](https://search.snine.nl) | 🇳🇱 NL | Mult-choice | ✅ |
| [https://whoogle.4040940.xyz/](https://whoogle.4040940.xyz/) | 🇺🇸 US | English | ✅ |
* A checkmark in the "Cloudflare" category here refers to the use of the reverse proxy, [Cloudflare](https://cloudflare.com). The checkmark will not be listed for a site which uses Cloudflare DNS but rather the proxying service which grants Cloudflare the ability to monitor traffic to the website.

View File

@ -37,8 +37,12 @@ def get_rule_for_selector(stylesheet: CSSStyleSheet,
class Config:
def __init__(self, **kwargs):
# User agent configuration
self.user_agent = kwargs.get('user_agent', 'LYNX_UA')
# User agent configuration - default to env_conf if environment variables exist, otherwise default
env_user_agent = os.getenv('WHOOGLE_USER_AGENT', '')
env_mobile_agent = os.getenv('WHOOGLE_USER_AGENT_MOBILE', '')
default_ua_option = 'env_conf' if (env_user_agent or env_mobile_agent) else 'default'
self.user_agent = kwargs.get('user_agent', default_ua_option)
self.custom_user_agent = kwargs.get('custom_user_agent', '')
self.use_custom_user_agent = kwargs.get('use_custom_user_agent', False)

View File

@ -73,18 +73,31 @@ def send_tor_signal(signal: Signal) -> bool:
def gen_user_agent(config, is_mobile) -> str:
# Define the Lynx user agent
LYNX_UA = 'Lynx/2.9.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/3.4.0'
# Define the default PlayStation Portable user agent (replaces Lynx)
DEFAULT_UA = 'Mozilla/4.0 (PSP (PlayStation Portable); 2.00)'
# If using custom user agent, return the custom string
if config.user_agent == 'custom' and config.custom_user_agent:
return config.custom_user_agent
# If using Lynx user agent
if config.user_agent == 'LYNX_UA':
return LYNX_UA
# If using environment configuration
if config.user_agent == 'env_conf':
if is_mobile:
env_ua = os.getenv('WHOOGLE_USER_AGENT_MOBILE', '')
if env_ua:
return env_ua
else:
env_ua = os.getenv('WHOOGLE_USER_AGENT', '')
if env_ua:
return env_ua
# If env vars are not set, fall back to default
return DEFAULT_UA
# If no custom user agent is set, generate a random one
# If using default user agent
if config.user_agent == 'default':
return DEFAULT_UA
# If no custom user agent is set, generate a random one (for backwards compatibility)
firefox = random.choice(['Choir', 'Squier', 'Higher', 'Wire']) + 'fox'
linux = random.choice(['Win', 'Sin', 'Gin', 'Fin', 'Kin']) + 'ux'

View File

@ -458,7 +458,9 @@ def config():
print(f"Setting custom user agent to: {config_data['custom_user_agent']}") # Debug log
else:
config_data['use_custom_user_agent'] = False
config_data['custom_user_agent'] = ''
# Only clear custom_user_agent if not using custom option
if config_data['user_agent'] != 'custom':
config_data['custom_user_agent'] = ''
# Save config by name to allow a user to easily load later
if name:

View File

@ -34,6 +34,20 @@ const setupConfigLayout = () => {
content.classList.toggle("open");
});
// Setup user agent dropdown handler
const userAgentSelect = document.getElementById("config-user-agent");
const customUserAgentDiv = document.querySelector(".config-div-custom-user-agent");
if (userAgentSelect && customUserAgentDiv) {
userAgentSelect.addEventListener("change", function() {
if (this.value === "custom") {
customUserAgentDiv.style.display = "block";
} else {
customUserAgentDiv.style.display = "none";
}
});
}
};
const loadConfig = event => {

View File

@ -128,8 +128,6 @@
{"name": "Lithuania", "value": "LT"},
{"name": "Luxembourg", "value": "LU"},
{"name": "Macao", "value": "MO"},
{"name": "Macedonia, the Former Yugosalv Republic of",
"value": "MK"},
{"name": "Madagascar", "value": "MG"},
{"name": "Malawi", "value": "MW"},
{"name": "Malaysia", "value": "MY"},
@ -162,6 +160,7 @@
{"name": "Nigeria", "value": "NG"},
{"name": "Niue", "value": "NU"},
{"name": "Norfolk Island", "value": "NF"},
{"name": "North Macedonia", "value": "MK"},
{"name": "Northern Mariana Islands", "value": "MP"},
{"name": "Norway", "value": "NO"},
{"name": "Oman", "value": "OM"},
@ -201,8 +200,7 @@
{"name": "Solomon Islands", "value": "SB"},
{"name": "Somalia", "value": "SO"},
{"name": "South Africa", "value": "ZA"},
{"name": "South Georgia and the South Sandwich Islands",
"value": "GS"},
{"name": "South Georgia and the South Sandwich Islands", "value": "GS"},
{"name": "Spain", "value": "ES"},
{"name": "Sri Lanka", "value": "LK"},
{"name": "Sudan", "value": "SD"},
@ -221,10 +219,10 @@
{"name": "Tonga", "value": "TO"},
{"name": "Trinidad and Tobago", "value": "TT"},
{"name": "Tunisia", "value": "TN"},
{"name": "Turkey", "value": "TR"},
{"name": "Turkmenistan", "value": "TM"},
{"name": "Turks and Caicos Islands", "value": "TC"},
{"name": "Tuvalu", "value": "TV"},
{"name": "Türkiye", "value": "TR"},
{"name": "Uganda", "value": "UG"},
{"name": "Ukraine", "value": "UA"},
{"name": "United Arab Emirates", "value": "AE"},

View File

@ -46,7 +46,7 @@
{"name": "Swahili (Kiswahili)", "value": "lang_sw"},
{"name": "Swedish (Svenska)", "value": "lang_sv"},
{"name": "Thai (ไทย)", "value": "lang_th"},
{"name": "Turkish (Türk)", "value": "lang_tr"},
{"name": "Turkish (Türkçe)", "value": "lang_tr"},
{"name": "Ukrainian (Українська)", "value": "lang_uk"},
{"name": "Vietnamese (Tiếng Việt)", "value": "lang_vi"},
{"name": "Welsh (Cymraeg)", "value": "lang_cy"},

View File

@ -1286,5 +1286,61 @@
"qdr:w": "Τελευταία Βδομάδα",
"qdr:m": "Τελευταίος Μήνας",
"qdr:y": "Τελευταίος Χρόνος"
}
},
"lang_tr": {
"": "--",
"search": "Ara",
"config": "Seçenekler",
"config-country": "Ülke",
"config-lang": "Arayüz Dili",
"config-lang-search": "Arama Dili",
"config-near": "Yakınında",
"config-near-help": "Şehir Adı",
"config-block": "Engelle",
"config-block-help": "Virgülle ayrılmış site listesi",
"config-block-title": "Başlığa Göre Engelle",
"config-block-title-help": "Regex kullan",
"config-block-url": "URL'ye Göre Engelle",
"config-block-url-help": "Regex kullan",
"config-theme": "Tema",
"config-nojs": "Anonim Görünümde Javascript'i Kaldır",
"config-anon-view": "Anonim Görünüm Bağlantılarını Göster",
"config-dark": "Karanlık Mod",
"config-safe": "Güvenli Arama",
"config-alts": "Sosyal Medya Bağlantılarını Değiştir",
"config-alts-help": "Twitter/YouTube/vb. bağlantıları gizliliğe saygılı alternatiflerle değiştirir.",
"config-new-tab": "Bağlantıları Yeni Sekmede Aç",
"config-images": "Tam Boyutlu Görsel Arama",
"config-images-help": "(Deneysel) Masaüstü görsel aramalarına 'Görseli Görüntüle' seçeneği ekler. Bu, görsel sonuç küçük resimlerinin daha düşük çözünürlükte olmasına neden olur.",
"config-tor": "Tor Kullan",
"config-get-only": "Yalnızca GET İstekleri",
"config-url": "Kök URL",
"config-pref-url": "Tercihler URL'si",
"config-pref-encryption": "Tercihleri Şifrele",
"config-pref-help": "WHOOGLE_CONFIG_PREFERENCES_KEY gerektirir, aksi takdirde bu göz ardı edilir.",
"config-css": "Özel CSS",
"config-time-period": "Zaman Aralığı",
"load": "Yükle",
"apply": "Uygula",
"save-as": "Farklı Kaydet...",
"github-link": "GitHub'da Görüntüle",
"translate": "çevir",
"light": "açık",
"dark": "koyu",
"system": "sistem",
"ratelimit": "Sunucu hız sınırına ulaştı",
"continue-search": "Aramanızı Farside ile sürdürün",
"all": "Tümü",
"images": "Görseller",
"maps": "Haritalar",
"videos": "Videolar",
"news": "Haberler",
"books": "Kitaplar",
"anon-view": "Anonim Görünüm",
"qdr:h": "Son saat",
"qdr:d": "Son 24 saat",
"qdr:w": "Geçen hafta",
"qdr:m": "Geçen ay",
"qdr:y": "Geçen yıl"
}
}

View File

@ -43,6 +43,16 @@
</li>
</ul>
</li>
<li>
<a href="https://git.lolcat.ca/lolcat/4get">4get</a>
<ul>
<li>
<a class="link-color" href="{{farside}}/4get/web?s={{query}}&scraper=google">
{{farside}}/4get/web?s={{query}}&scraper=google
</a>
</li>
</ul>
</li>
</ul>
<hr>
<h4>Other options:</h4>
@ -58,6 +68,16 @@
</li>
</ul>
</li>
<li>
<a href="https://4get.ca">4get</a>
<ul>
<li>
<a class="link-color" href="https://4get.ca/web?s={{query}}">
4get.ca/web?s={{query}}
</a>
</li>
</ul>
</li>
<li>
<a href="https://duckduckgo.com">DuckDuckGo</a>
<ul>

View File

@ -231,8 +231,8 @@
<div class="config-div config-div-user-agent">
<label for="config-user-agent">User Agent: </label>
<select name="user_agent" id="config-user-agent">
<option value="LYNX_UA" {% if not config.user_agent or config.user_agent == 'LYNX_UA' %}selected{% endif %}>Lynx Browser</option>
<option value="" {% if config.user_agent == '' and config.user_agent != 'LYNX_UA' %}selected{% endif %}>Original (Random)</option>
<option value="env_conf" {% if config.user_agent == 'env_conf' %}selected{% endif %}>Use ENV Conf</option>
<option value="default" {% if config.user_agent == 'default' %}selected{% endif %}>Default</option>
<option value="custom" {% if config.user_agent == 'custom' %}selected{% endif %}>Custom</option>
</select>
</div>

View File

@ -147,12 +147,13 @@ class Search:
# force mobile search when view image is true and
# the request is not already made by a mobile
view_image = ('tbm=isch' in full_query
and self.config.view_image
and not g.user_request.mobile)
# FIXME: Broken since the user agent changes as of 16 Jan 2025
# view_image = ('tbm=isch' in full_query
# and self.config.view_image
# and not g.user_request.mobile)
get_body = g.user_request.send(query=full_query,
force_mobile=view_image,
force_mobile=self.config.view_image,
user_agent=self.user_agent)
# Produce cleanable html soup from response
@ -160,8 +161,9 @@ class Search:
html_soup = bsoup(get_body_safed, 'html.parser')
# Replace current soup if view_image is active
if view_image:
html_soup = content_filter.view_image(html_soup)
# FIXME: Broken since the user agent changes as of 16 Jan 2025
# if view_image:
# html_soup = content_filter.view_image(html_soup)
# Indicate whether or not a Tor connection is active
if g.user_request.tor_valid:

View File

@ -4,4 +4,4 @@ optional_dev_tag = ''
if os.getenv('DEV_BUILD'):
optional_dev_tag = '.dev' + os.getenv('DEV_BUILD')
__version__ = '0.9.3' + optional_dev_tag
__version__ = '0.9.4' + 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.9.3
appVersion: 0.9.4
icon: https://github.com/benbusby/whoogle-search/raw/main/app/static/img/favicon/favicon-96x96.png

View File

@ -1,24 +1,6 @@
https://search.albony.xyz
https://search.garudalinux.org
https://search.dr460nf1r3.org
https://search.nezumi.party
https://s.tokhmi.xyz
https://search.sethforprivacy.com
https://whoogle.dcs0.hu
https://whoogle.lunar.icu
https://gowogle.voring.me
https://whoogle.privacydev.net
https://whoogle.hostux.net
https://wg.vern.cc
https://whoogle.hxvy0.gq
https://whoogle.ungovernable.men
https://whoogle2.ungovernable.men
https://whoogle3.ungovernable.men
https://wgl.frail.duckdns.org
https://whoogle.no-logs.com
https://whoogle.ftw.lol
https://whoogle-search--replitcomreside.repl.co
https://search.notrustverify.ch
https://whoogle.datura.network
https://whoogle.yepserver.xyz
https://search.snine.nl
https://whoogle.lunar.icu
https://whoogle.4040940.xyz

View File

@ -7,13 +7,13 @@ cffi==1.17.1
chardet==5.1.0
click==8.1.3
cryptography==3.3.2; platform_machine == 'armv7l'
cryptography==43.0.1; platform_machine != 'armv7l'
cryptography==45.0.7; platform_machine != 'armv7l'
cssutils==2.7.0
defusedxml==0.7.1
Flask==2.3.2
idna==3.7
itsdangerous==2.1.2
Jinja2==3.1.5
Jinja2==3.1.6
MarkupSafe==2.1.2
more-itertools==9.0.0
packaging==23.0
@ -21,7 +21,7 @@ pluggy==1.0.0
pycodestyle==2.10.0
pycparser==2.22
pyOpenSSL==19.1.0; platform_machine == 'armv7l'
pyOpenSSL==24.2.1; platform_machine != 'armv7l'
pyOpenSSL==25.3.0; platform_machine != 'armv7l'
pyparsing==3.0.9
PySocks==1.7.1
pytest==7.2.1