Compare commits

..

No commits in common. "main" and "v0.9.3" have entirely different histories.
main ... v0.9.3

16 changed files with 66 additions and 176 deletions

View File

@ -1,33 +0,0 @@
# 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,13 +699,27 @@ 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://whoogle.4040940.xyz/](https://whoogle.4040940.xyz/) | 🇺🇸 US | English | ✅ |
| [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 | ✅ |
* 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,12 +37,8 @@ def get_rule_for_selector(stylesheet: CSSStyleSheet,
class Config:
def __init__(self, **kwargs):
# 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)
# User agent configuration
self.user_agent = kwargs.get('user_agent', 'LYNX_UA')
self.custom_user_agent = kwargs.get('custom_user_agent', '')
self.use_custom_user_agent = kwargs.get('use_custom_user_agent', False)

View File

@ -73,31 +73,18 @@ def send_tor_signal(signal: Signal) -> bool:
def gen_user_agent(config, is_mobile) -> str:
# Define the default PlayStation Portable user agent (replaces Lynx)
DEFAULT_UA = 'Mozilla/4.0 (PSP (PlayStation Portable); 2.00)'
# Define the Lynx user agent
LYNX_UA = 'Lynx/2.9.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/3.4.0'
# 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 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 using Lynx user agent
if config.user_agent == 'LYNX_UA':
return LYNX_UA
# 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)
# If no custom user agent is set, generate a random one
firefox = random.choice(['Choir', 'Squier', 'Higher', 'Wire']) + 'fox'
linux = random.choice(['Win', 'Sin', 'Gin', 'Fin', 'Kin']) + 'ux'

View File

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

View File

@ -34,20 +34,6 @@ 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,6 +128,8 @@
{"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"},
@ -160,7 +162,6 @@
{"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"},
@ -200,7 +201,8 @@
{"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"},
@ -219,10 +221,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çe)", "value": "lang_tr"},
{"name": "Turkish (Türk)", "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,61 +1286,5 @@
"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,16 +43,6 @@
</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>
@ -68,16 +58,6 @@
</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="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="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="custom" {% if config.user_agent == 'custom' %}selected{% endif %}>Custom</option>
</select>
</div>

View File

@ -147,13 +147,12 @@ class Search:
# force mobile search when view image is true and
# the request is not already made by a 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)
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=self.config.view_image,
force_mobile=view_image,
user_agent=self.user_agent)
# Produce cleanable html soup from response
@ -161,9 +160,8 @@ class Search:
html_soup = bsoup(get_body_safed, 'html.parser')
# Replace current soup if view_image is active
# FIXME: Broken since the user agent changes as of 16 Jan 2025
# if view_image:
# html_soup = content_filter.view_image(html_soup)
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.4' + optional_dev_tag
__version__ = '0.9.3' + 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.4
appVersion: 0.9.3
icon: https://github.com/benbusby/whoogle-search/raw/main/app/static/img/favicon/favicon-96x96.png

View File

@ -1,6 +1,24 @@
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.privacydev.net
https://wg.vern.cc
https://whoogle.dcs0.hu
https://whoogle.lunar.icu
https://whoogle.4040940.xyz
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

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==45.0.7; platform_machine != 'armv7l'
cryptography==43.0.1; 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.6
Jinja2==3.1.5
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==25.3.0; platform_machine != 'armv7l'
pyOpenSSL==24.2.1; platform_machine != 'armv7l'
pyparsing==3.0.9
PySocks==1.7.1
pytest==7.2.1