コミットを比較

...

10 コミット

作成者 SHA1 メッセージ 日付
守矢諏訪子 014187f63a 変更 2023-04-01 10:38:35 +09:00
Ben Busby 5ae9160d38
Move replit startup commands to their own script
The .replit file gets autofilled with a ton of garbage when Whoogle is
imported, including a required "entrypoint" field that defaults to
"main.py" (even though the run and onBoot fields were already included
and should negate the need to specify an entrypoint, but whatever).
I'm not going to restructure Whoogle to fit what Replit wants, so I've
moved the startup commands to their own script (misc/replit.py) and
updated the "entrypoint" field in .replit.
2023-03-22 13:05:17 -06:00
Ben Busby 076948dd0e
Convert replit run + onBoot commands to arrays
Apparently Replit requires these values to be arrays now instead of
strings.
2023-03-22 12:40:30 -06:00
Ben Busby b39ba0533a
Suppress spurious warnings from bs4
More MarkupResemblesLocatorWarning warnings have been appearing. This
seems to be caused by parsing HTML content that contains a URL.

This new change suppresses the warning at the root level of the app
before any content has been parsed, so this error shouldn't appear
again.

Fixes #968
2023-03-22 12:29:05 -06:00
PrivacyDevel 229c9388cf
Update public instance server location [skip ci] (#972) 2023-03-20 13:09:16 -06:00
xatier f970b62f12
Update zh-tw translation (#973)
* Add translation for new strings from 7041b43db9
  Use same terms as Google's zh-tw interface.
* Fix missing period
* Sync string order with en (easier for future updates)
2023-03-20 13:08:18 -06:00
xatier 31feb7228f
Update README [skip ci] (#971)
* add `WHOOGLE_CONFIG_BLOCK_TITLE` and `WHOOGLE_CONFIG_BLOCK_URL`

* this feature was originally added in 284a8102c8
  but remained undocumented.

Ref: conversations in https://github.com/benbusby/whoogle-search/pull/969
2023-03-15 10:14:53 -06:00
xatier b1e468ff01
Fix bug in title/url blocking regex (#969)
Fix the exception `AttributeError: 'Filter' object has no attribute 'block_url'`
introduced in this commit [1].

`self.block_title` and `self.block_url` were members of the Filter
object[2], but not anymore after commit [1].

This bug can be reproduced with setting WHOOGLE_CONFIG_BLOCK_URL to a
non-empty string.

[1] 10a15e06e1
[2] 284a8102c8
2023-03-14 11:22:53 -06:00
Ben Busby 8c426ab180
Suppress invalid warning from bs4, add 404 handler
An invalid parsing warning was being thrown by the latest version of the
bs4 library. This suppresses that warning from being shown in the
console.

A 404 handler was added to move logging from the console to the error
template, since a lot of users assumed that 404 errors from the result
page were problems with Whoogle itself.

Fixes #967
2023-03-07 11:28:55 -07:00
Ben Busby f7c4381ba6
Remove `preferences` arg from opensearch template
When a browser adds a search engine using the opensearch template, it
does not have the correct context necessary to autofill the
`preferences` arg with the user's session prefs. As a result, queries
made using the browser bar will have the instance's default preferences
filled into the template.

Removing this shouldn't have any side effects, since queries made on the
same machine will have the correct session associated with the user.

Fixes #929
2023-03-06 15:33:28 -07:00
22個のファイルの変更307行の追加53行の削除

ファイルの表示

@ -1,3 +1 @@
language = "bash"
run = "killall -q python3 > /dev/null 2>&1; pip install -r requirements.txt && ./run"
onBoot = "killall -q python3 > /dev/null 2>&1; pip install -r requirements.txt && ./run"
entrypoint = "misc/replit.py"

ファイルの表示

@ -427,6 +427,8 @@ These environment variables allow setting default config values, but can be over
| WHOOGLE_CONFIG_LANGUAGE | Set interface language |
| WHOOGLE_CONFIG_SEARCH_LANGUAGE | Set search result language |
| WHOOGLE_CONFIG_BLOCK | Block websites from search results (use comma-separated list) |
| WHOOGLE_CONFIG_BLOCK_TITLE | Block search result with a REGEX filter on title |
| WHOOGLE_CONFIG_BLOCK_URL | Block search result with a REGEX filter on URL |
| WHOOGLE_CONFIG_THEME | Set theme mode (light, dark, or system) |
| WHOOGLE_CONFIG_SAFE | Enable safe searches |
| WHOOGLE_CONFIG_ALTS | Use social media site alternatives (nitter, invidious, etc) |
@ -621,7 +623,7 @@ A lot of the app currently piggybacks on Google's existing support for fetching
| [https://whoogle.dcs0.hu](https://whoogle.dcs0.hu) | 🇭🇺 HU | Multi-choice | |
| [https://whoogle.esmailelbob.xyz](https://whoogle.esmailelbob.xyz) | 🇨🇦 CA | Multi-choice | |
| [https://gowogle.voring.me](https://gowogle.voring.me) | 🇺🇸 US | Multi-choice | |
| [https://whoogle.privacydev.net](https://whoogle.privacydev.net) | 🇺🇸 US | English | |
| [https://whoogle.privacydev.net](https://whoogle.privacydev.net) | 🇳🇱 NL | 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 | |
@ -638,7 +640,7 @@ A lot of the app currently piggybacks on Google's existing support for fetching
| [http://whoglqjdkgt2an4tdepberwqz3hk7tjo4kqgdnuj77rt7nshw2xqhqad.onion](http://whoglqjdkgt2an4tdepberwqz3hk7tjo4kqgdnuj77rt7nshw2xqhqad.onion) | 🇺🇸 US | Multi-choice
| [http://nuifgsnbb2mcyza74o7illtqmuaqbwu4flam3cdmsrnudwcmkqur37qd.onion](http://nuifgsnbb2mcyza74o7illtqmuaqbwu4flam3cdmsrnudwcmkqur37qd.onion) | 🇩🇪 DE | English
| [http://whoogle.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion](http://whoogle.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/) | 🇺🇸 US | English |
| [http://whoogle.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion](http://whoogle.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion/) | 🇺🇸 US | English |
| [http://whoogle.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion](http://whoogle.g4c3eya4clenolymqbpgwz3q3tawoxw56yhzk4vugqrl6dtu3ejvhjid.onion/) | 🇳🇱 NL | English |
#### I2P Instances

ファイルの表示

@ -4,14 +4,16 @@ from app.utils.session import generate_key
from app.utils.bangs import gen_bangs_json
from app.utils.misc import gen_file_hash, read_config_bool
from base64 import b64encode
from bs4 import MarkupResemblesLocatorWarning
from datetime import datetime, timedelta
from dotenv import load_dotenv
from flask import Flask
import json
import logging.config
import os
from stem import Signal
import threading
from dotenv import load_dotenv
import warnings
from werkzeug.middleware.proxy_fix import ProxyFix
@ -174,6 +176,9 @@ app.jinja_env.globals.update(
# Attempt to acquire tor identity, to determine if Tor config is available
send_tor_signal(Signal.HEARTBEAT)
# Suppress spurious warnings from BeautifulSoup
warnings.simplefilter('ignore', MarkupResemblesLocatorWarning)
from app import routes # noqa
# Disable logging from imported modules

ファイルの表示

@ -225,7 +225,7 @@ class Filter:
def remove_block_titles(self) -> None:
if not self.main_divs or not self.config.block_title:
return
block_title = re.compile(self.block_title)
block_title = re.compile(self.config.block_title)
for div in [_ for _ in self.main_divs.find_all('div', recursive=True)]:
block_divs = [_ for _ in div.find_all('h3', recursive=True)
if block_title.search(_.text) is not None]
@ -234,7 +234,7 @@ class Filter:
def remove_block_url(self) -> None:
if not self.main_divs or not self.config.block_url:
return
block_url = re.compile(self.block_url)
block_url = re.compile(self.config.block_url)
for div in [_ for _ in self.main_divs.find_all('div', recursive=True)]:
block_divs = [_ for _ in div.find_all('a', recursive=True)
if block_url.search(_.attrs['href']) is not None]

ファイルの表示

@ -251,8 +251,7 @@ def opensearch():
main_url=opensearch_url,
request_type='' if get_only else 'method="post"',
search_type=request.args.get('tbm'),
search_name=get_search_name(request.args.get('tbm')),
preferences=g.user_config.preferences
search_name=get_search_name(request.args.get('tbm'))
), 200, {'Content-Type': 'application/xml'}
@ -558,6 +557,11 @@ def window():
)
@app.errorhandler(404)
def page_not_found(e):
return render_template('error.html', error_message=str(e)), 404
def run_app() -> None:
parser = argparse.ArgumentParser(
description='Whoogle Search console runner')

ファイルの表示

@ -167,8 +167,8 @@ a {
}
span.header-tab-span {
border-bottom: 2px solid #4285f4;
color: #4285f4;
border-bottom: 2px solid #e307d6;
color: #e307d6;
font-weight: bold;
}

218
app/static/css/loli-theme.css ノーマルファイル
ファイルの表示

@ -0,0 +1,218 @@
html {
background: var(--whoogle-loli-page-bg) !important;
}
body {
background: var(--whoogle-loli-page-bg) !important;
}
div {
color: var(--whoogle-loli-text) !important;
}
label {
color: var(--whoogle-loli-contrast-text) !important;
}
li a {
color: var(--whoogle-loli-result-url) !important;
}
li {
color: var(--whoogle-loli-text) !important;
}
.anon-view {
color: var(--whoogle-loli-text) !important;
text-decoration: underline;
}
textarea {
background: var(--whoogle-loli-page-bg) !important;
color: var(--whoogle-loli-text) !important;
}
a:visited h3 div {
color: var(--whoogle-loli-result-visited) !important;
}
a:link h3 div {
color: var(--whoogle-loli-result-title) !important;
}
a:link div {
color: var(--whoogle-loli-result-url) !important;
}
div span {
color: var(--whoogle-loli-secondary-text) !important;
}
input {
background-color: var(--whoogle-loli-page-bg) !important;
color: var(--whoogle-loli-text) !important;
}
select {
background: var(--whoogle-loli-page-bg) !important;
color: var(--whoogle-loli-text) !important;
}
.search-container {
background-color: var(--whoogle-loli-page-bg) !important;
}
.ZINbbc {
overflow: hidden;
box-shadow: 0 0 0 0 !important;
background-color: var(--whoogle-loli-result-bg) !important;
margin-bottom: 10px !important;
border-radius: 8px !important;
}
.KP7LCb {
box-shadow: 0 0 0 0 !important;
}
.BVG0Nb {
box-shadow: 0 0 0 0 !important;
background-color: var(--whoogle-loli-page-bg) !important;
}
.ZINbbc.luh4tb {
background: var(--whoogle-loli-result-bg) !important;
margin-bottom: 24px !important;
}
.bRsWnc {
background-color: var(--whoogle-loli-result-bg) !important;
}
.x54gtf {
background-color: var(--whoogle-loli-divider) !important;
}
.Q0HXG {
background-color: var(--whoogle-loli-divider) !important;
}
.LKSyXe {
background-color: var(--whoogle-loli-divider) !important;
}
.home-search {
border-color: var(--whoogle-loli-element-bg) !important;
}
.sa1toc {
background: var(--whoogle-loli-page-bg) !important;
}
#search-bar {
border-color: var(--whoogle-loli-element-bg) !important;
color: var(--whoogle-loli-text) !important;
background-color: var(--whoogle-loli-result-bg) !important;
border-bottom: 2px solid var(--whoogle-loli-element-bg);
}
#search-bar:focus {
color: var(--whoogle-loli-text) !important;
}
#search-submit {
border: 1px solid var(--whoogle-loli-element-bg) !important;
background: var(--whoogle-loli-element-bg) !important;
color: var(--whoogle-loli-contrast-text) !important;
}
.info-text {
color: var(--whoogle-loli-contrast-text) !important;
opacity: 75%;
}
.collapsible {
color: var(--whoogle-loli-text) !important;
}
.collapsible:after {
color: var(--whoogle-loli-text) !important;
}
.active {
background-color: var(--whoogle-loli-element-bg) !important;
color: var(--whoogle-loli-contrast-text) !important;
}
.content, .result-config {
background-color: var(--whoogle-loli-element-bg) !important;
color: var(--whoogle-contrast-text) !important;
}
.active:after {
color: var(--whoogle-loli-contrast-text) !important;
}
.link {
color: var(--whoogle-loli-contrast-text);
}
.link-color {
color: var(--whoogle-loli-result-url) !important;
}
.autocomplete-items {
border: 1px solid var(--whoogle-loli-element-bg);
}
.autocomplete-items div {
color: var(--whoogle-loli-text);
background-color: var(--whoogle-loli-page-bg);
border-bottom: 1px solid var(--whoogle-loli-element-bg);
}
.autocomplete-items div:hover {
background-color: var(--whoogle-loli-element-bg);
color: var(--whoogle-loli-contrast-text) !important;
}
.autocomplete-active {
background-color: var(--whoogle-loli-element-bg) !important;
color: var(--whoogle-loli-contrast-text) !important;
}
.footer {
color: var(--whoogle-loli-text);
}
path {
fill: var(--whoogle-loli-logo);
}
.header-div {
background-color: var(--whoogle-loli-result-bg) !important;
}
#search-reset {
color: var(--whoogle-loli-text) !important;
}
.mobile-search-bar {
background-color: var(--whoogle-loli-result-bg) !important;
color: var(--whoogle-loli-text) !important;
}
.search-bar-desktop {
color: var(--whoogle-loli-text) !important;
}
.ip-text-div, .update_available, .cb_label, .cb {
color: var(--whoogle-loli-secondary-text) !important;
}
.cb:focus {
color: var(--whoogle-loli-contrast-text) !important;
}
.desktop-header, .mobile-header {
background-color: var(--whoogle-loli-result-bg) !important;
}

ファイルの表示

@ -2,7 +2,7 @@ body {
font-family: Avenir, Helvetica, Arial, sans-serif;
}
.logo {
.owacon-logo, .logo {
width: 80%;
display: block;
margin: auto;

ファイルの表示

@ -3,6 +3,10 @@ body {
margin: auto !important;
}
.owacon-logo {
width: 30%;
}
.vvjwJb {
font-size: 16px !important;
}

ファイルの表示

@ -23,6 +23,18 @@
--whoogle-dark-result-title: #64a7f6;
--whoogle-dark-result-url: #34a853;
--whoogle-dark-result-visited: #bbbbff;
/* LOLI THEME COLORS */
--whoogle-loli-logo: #795e70;
--whoogle-loli-page-bg: #20101e;
--whoogle-loli-element-bg: #e307d6;
--whoogle-loli-text: #fcfcfc;
--whoogle-loli-contrast-text: #fcfcfc;
--whoogle-loli-secondary-text: #cacaca;
--whoogle-loli-result-bg: #312131;
--whoogle-loli-result-title: #f664e6;
--whoogle-loli-result-url: #34a853;
--whoogle-loli-result-visited: #ffbbf8;
}
#whoogle-w {

バイナリ
app/static/img/owacon.png ノーマルファイル

バイナリファイルは表示されません。

変更後

幅:  |  高さ:  |  サイズ: 23 KiB

ファイルの表示

@ -1,4 +1,5 @@
[
"loli",
"light",
"dark",
"system"

ファイルの表示

@ -37,6 +37,7 @@
"save-as": "Save As...",
"github-link": "View on GitHub",
"translate": "translate",
"loli": "loli",
"light": "light",
"dark": "dark",
"system": "system",
@ -91,6 +92,7 @@
"save-as": "Opslaan Als...",
"github-link": "Bekijk op GitHub",
"translate": "vertalen",
"loli": "loli",
"light": "helder",
"dark": "donker",
"system": "systeeminstellingen",
@ -147,6 +149,7 @@
"save-as": "Speichern unter...",
"github-link": "Auf GitHub öffnen",
"translate": "Übersetzen",
"loli": "loli",
"light": "hell",
"dark": "dunkel",
"system": "Systemeinstellung",
@ -203,6 +206,7 @@
"save-as": "Guardar como...",
"github-link": "Ver en GitHub",
"translate": "traducir",
"loli": "loli",
"light": "brillante",
"dark": "oscuro",
"system": "configuración del sistema",
@ -261,6 +265,7 @@
"save-as": "Simpan Sebagai...",
"github-link": "Lihat di GitHub",
"translate": "terjemahkan",
"loli": "loli",
"light": "terang",
"dark": "gelap",
"system": "sistem",
@ -315,6 +320,7 @@
"save-as": "Salva Come...",
"github-link": "Guarda su GitHub",
"translate": "tradurre",
"loli": "loli",
"light": "luminoso",
"dark": "notte",
"system": "impostazioni di sistema",
@ -371,6 +377,7 @@
"save-as": "Guardar Como...",
"github-link": "Ver no GitHub",
"translate": "traduzir",
"loli": "loli",
"light": "brilhante",
"dark": "escuro",
"system": "configuração de sistema",
@ -427,6 +434,7 @@
"save-as": "Сохранить как...",
"github-link": "Посмотреть на GitHub",
"translate": "перевести",
"loli": "loli",
"light": "светлая",
"dark": "тёмная",
"system": "системная",
@ -483,6 +491,7 @@
"save-as": "另存为...",
"github-link": "在 GitHub 上查看",
"translate": "翻译",
"loli": "loli",
"light": "明亮的",
"dark": "黑暗的",
"system": "系统设置",
@ -539,6 +548,7 @@
"save-as": "...ලෙස සුරකින්න",
"github-link": "ගිට්හබ් හි බලන්න",
"translate": "පරිවර්තනය කරන්න",
"loli": "loli",
"light": "දීප්තිමත්",
"dark": "අඳුරු",
"system": "පද්ධතිය",
@ -595,6 +605,7 @@
"save-as": "Sauvegarder comme...",
"github-link": "Voir sur GitHub",
"translate": "Traduire",
"loli": "loli",
"light": "clair",
"dark": "sombre",
"system": "système",
@ -651,6 +662,7 @@
"save-as": "ذخیره به عنوان...",
"github-link": "نمایش در گیت‌هاب",
"translate": "ترجمه",
"loli": "loli",
"light": "روشن",
"dark": "تیره",
"system": "سیستم",
@ -707,6 +719,7 @@
"save-as": "Uložit jako...",
"github-link": "Zobrazit na GitHub",
"translate": "Přeložit",
"loli": "loli",
"light": "Světlý",
"dark": "Tmavý",
"system": "Systémový",
@ -728,6 +741,7 @@
"config-time-period": "Časový úsek"
},
"lang_zh-TW": {
"": "--",
"search": "搜尋",
"config": "設定",
"config-country": "設定國家",
@ -750,7 +764,7 @@
"config-alts-help": "將 Twitter/YouTube 等網站之連結替換為尊重隱私的第三方網站。",
"config-new-tab": "以新分頁開啟連結",
"config-images": "完整尺寸圖片搜尋",
"config-images-help": "(實驗性)在桌面版圖片搜尋中增加「檢視圖片」選項。這會使搜尋結果圖片解析度降低",
"config-images-help": "(實驗性)在桌面版圖片搜尋中增加「檢視圖片」選項。這會使搜尋結果圖片解析度降低",
"config-tor": "使用 Tor",
"config-get-only": "僅限於 GET 要求",
"config-url": "首頁網址",
@ -758,11 +772,13 @@
"config-pref-encryption": "加密設定",
"config-pref-help": "需要一併設定 WHOOGLE_CONFIG_PREFERENCES_KEY否則將會被忽略。",
"config-css": "自定 CSS",
"config-time-period": "時間範圍",
"load": "載入",
"apply": "套用",
"save-as": "另存為...",
"github-link": "在 GitHub 上檢視",
"translate": "翻譯",
"loli": "loli",
"light": "明亮的",
"dark": "黑暗的",
"system": "依照系統設定",
@ -775,13 +791,11 @@
"news": "新聞",
"books": "書籍",
"anon-view": "匿名檢視",
"": "--",
"qdr:h": "过去一小时",
"qdr:d": "过去 24 小时",
"qdr:w": "上周",
"qdr:m": "过去一个月",
"qdr:y": "过去一年",
"config-time-period": "时间段"
"qdr:h": "過去 1 小時",
"qdr:d": "過去 24 小時",
"qdr:w": "過去 1 週",
"qdr:m": "過去 1 個月",
"qdr:y": "過去 1 年"
},
"lang_bg": {
"search": "Търсене",
@ -819,6 +833,7 @@
"save-as": "Запис като...",
"github-link": "Вижте в GitHub",
"translate": "превод",
"loli": "loli",
"light": "светла",
"dark": "тъмна",
"system": "системна",
@ -875,6 +890,7 @@
"save-as": "के रूप रक्षित करें...",
"github-link": "गिटहब पर देखें",
"translate": "अनुवाद करना",
"loli": "loli",
"light": "रोशनी",
"dark": "अंधेरा",
"system": "प्रणाली",
@ -931,6 +947,7 @@
"save-as": "名前を付けて保存",
"github-link": "Githubで確認",
"translate": "翻訳",
"loli": "ロリ",
"light": "ライト",
"dark": "ダーク",
"system": "自動",
@ -987,6 +1004,7 @@
"save-as": "다른 이름으로 저장...",
"github-link": "깃허브에서 보기",
"translate": "번역",
"loli": "loli",
"light": "라이트",
"dark": "다크",
"system": "시스템",
@ -1043,6 +1061,7 @@
"save-as": "Biparêze wekî...",
"github-link": "Li ser GitHub Nîşan bide",
"translate": "werger",
"loli": "loli",
"light": "ronî",
"dark": "tarî",
"system": "pergal",
@ -1099,6 +1118,7 @@
"save-as": "บันทึกเป็น...",
"github-link": "ดูบน GitHub",
"translate": "แปลภาษา",
"loli": "loli",
"light": "สว่าง",
"dark": "มืด",
"system": "ระบบ",
@ -1155,6 +1175,7 @@
"save-as": "Cadw Fel...",
"github-link": "Gweld ar GitHub",
"translate": "cyfieithu",
"loli": "loli",
"light": "golau",
"dark": "tywyll",
"system": "system",
@ -1213,6 +1234,7 @@
"save-as": "Fərqli Saxla...",
"github-link": "GitHub-da baxın",
"translate": "tərcümə",
"loli": "loli",
"light": "işıqlı",
"dark": "qaranlıq",
"system": "sistem",
@ -1269,6 +1291,7 @@
"save-as": "Save As...",
"github-link": "View on GitHub",
"translate": "translate",
"loli": "loli",
"light": "light",
"dark": "dark",
"system": "system",

ファイルの表示

@ -3,9 +3,9 @@
<link rel="shortcut icon" href="static/img/favicon.ico" type="image/x-icon">
<link rel="icon" href="static/img/favicon.ico" type="image/x-icon">
{% if not search_type %}
<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="Whoogle Search">
<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="オワコン検索">
{% else %}
<link rel="search" href="opensearch.xml?tbm={{ search_type }}" type="application/opensearchdescription+xml" title="Whoogle Search ({{ search_name }})">
<link rel="search" href="opensearch.xml?tbm={{ search_type }}" type="application/opensearchdescription+xml" title="オワコン検索 ({{ search_name }})">
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer">
@ -26,7 +26,7 @@
<link rel="stylesheet" href="{{ cb_url(('dark' if config.dark else 'light') + '-theme.css') }}"/>
{% endif %}
<style>{{ config.style }}</style>
<title>{{ clean_query(query) }} - Whoogle Search</title>
<title>{{ clean_query(query) }} - オワコン検索</title>
</head>
<body>
{{ search_header|safe }}

ファイルの表示

@ -1,7 +1,8 @@
<footer>
<p class="footer">
Whoogle Search v{{ version_number }} ||
<a class="link" href="https://github.com/benbusby/whoogle-search">{{ translation['github-link'] }}</a>
オワコン検索 v{{ version_number }} ||
<a class="link" href="https://github.com/benbusby/whoogle-search">{{ translation['github-link'] }}</a> ||
<a class="link" href="https://gitler.moe/suwako/whoogle-mod">編集したコード</a>
{% if has_update %}
|| <span class="update_available">Update Available 🟢</span>
{% endif %}

ファイルの表示

@ -21,7 +21,7 @@
<script src="{{ cb_url('autocomplete.js') }}"></script>
{% endif %}
<script type="text/javascript" src="{{ cb_url('controller.js') }}"></script>
<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="Whoogle Search">
<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="オワコン検索">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{{ cb_url('logo.css') }}">
{% if config.theme %}
@ -56,7 +56,7 @@
</style>
</noscript>
<style>{{ config.style }}</style>
<title>Whoogle Search</title>
<title>オワコン検索</title>
</head>
<body id="main">
<div class="search-container">

ファイルの表示

@ -1,18 +1 @@
<svg id="Layer_1" class="whoogle-svg" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1028 254">
<defs>
<style>
</style>
</defs>
<path class="cls-1" d="M1197,667H446V413H1474V667H1208a26.41,26.41,0,0,1,4.26-1.16c32.7-3.35,55.65-27.55,56.45-60.44.57-23.65.27-47.33.32-71,0-17.84-.16-35.67.11-53.5.07-4.92-1.57-6.54-6.3-6.11a74.65,74.65,0,0,1-11,0c-3.63-.2-5.18,1.13-5,4.87.22,4.22.05,8.45.05,12.68a6.16,6.16,0,0,1-3.78-2c-20-23.41-53.18-26.6-77.53-7.84-34,26.17-33.8,79.89-7.68,107.44,24.9,26.24,66,24.37,85.69-1.54a14.39,14.39,0,0,1,2.73-2c0,6.94.39,13.22-.08,19.42-1.18,15.5-7.79,28.06-22.32,34.72-15,6.85-30.27,7.21-44-2.92-5.82-4.28-10.1-10.66-15.66-16.71l-19.87,8.29c8.77,16.61,20.28,29.09,38.17,34.48C1187.28,665.12,1192.18,665.92,1197,667ZM447.16,414.27c.39,1.85.57,3,.86,4q25.22,91.07,50.4,182.12c.92,3.32,2.43,4.55,5.92,4.29a82,82,0,0,1,13.48,0c4.6.43,6.56-1.13,8-5.68,12.37-38.63,25-77.15,37.66-115.7.52-1.6,1.26-3.12,1.89-4.67l1.35.06c.81,2.26,1.68,4.51,2.42,6.79q18.62,57.13,37.12,114.31c1.13,3.5,2.61,5.23,6.58,4.89a80.69,80.69,0,0,1,14,0c4.15.37,5.75-1.19,6.79-5.11Q655,518.89,676.57,438.23c2.07-7.78,4.06-15.58,6.24-24-6.92,0-13.07.29-19.19-.11-4.21-.27-5.6,1.31-6.59,5.25q-17.61,70.1-35.6,140.11c-.42,1.61-1.07,3.17-1.62,4.75a10,10,0,0,1-3.16-4.88q-17.11-51.6-34.21-103.21c-1.72-5.19-2.29-12.33-6-14.86-3.9-2.7-10.86-.78-16.45-1.28-4.1-.37-5.73,1.25-7,5.08q-18.7,57.12-37.79,114.11c-.59,1.77-1.43,3.45-2.15,5.18a9.31,9.31,0,0,1-2.68-4.69Q500.5,522.88,490.62,486c-6-22.47-12-45-18.13-67.39-.44-1.63-2-4.13-3.12-4.19C462.13,414.08,454.86,414.27,447.16,414.27ZM1473.38,543.71c-1-8.62-1.16-16.45-2.77-24-5.08-23.65-18.41-40.82-42.31-47.12-24.75-6.52-47.33-2-65,18.14-15.82,18.09-19.77,39.44-16.45,62.6,4,27.73,26.6,52.65,58.1,54.81,21.42,1.46,39.91-3.91,54.24-20.46,3.51-4.05,6.13-8.88,9.54-13.92l-20.94-8.68c-13.71,20.22-30.84,26.7-50.55,19.53-17.08-6.21-29-23.88-27.23-40.92Zm-746-51.07-1.12-.55V414.65H703.69V604.22h23v-6.36c0-21.84-.08-43.68,0-65.52.07-11.59,3.84-21.92,11.82-30.46,9.41-10.07,21.15-11.89,34-8.78,11.13,2.72,17.67,10.23,20.26,21.14a55.72,55.72,0,0,1,1.46,12.34c.13,24,.07,48,.07,72v5.6h23.49v-4.87c0-24.84.05-49.68-.06-74.52a101.29,101.29,0,0,0-1.06-13.91c-2.8-19.45-15.29-34.48-32.34-38.55-21.17-5-39.58-.47-54.11,16.51C729.19,490.07,728.29,491.38,727.34,492.64Zm179.93-22.47c-38.65,0-66.92,28.86-67,68.47-.06,40.49,28.07,70,66.72,70,38.38,0,66.64-29.26,66.67-69C973.71,499.1,946.09,470.21,907.27,470.17Zm82.22,69.31c.57,5.12.76,10.32,1.76,15.35,10.69,53.81,69.71,66.73,104.35,41.39,20.15-14.74,27.8-35.52,27.31-60.14-.88-44.18-40.84-78.15-90-62.12C1006.24,482.67,989.72,508.59,989.49,539.48Zm333.81,64.95V414.62h-22.65V604.43Z" transform="translate(-446 -413)"></path>
<path id="whoogle-g" d="M1197,667c-4.82-1.08-9.72-1.88-14.44-3.3-17.89-5.39-29.4-17.87-38.17-34.48l19.87-8.29c5.56,6.05,9.84,12.43,15.66,16.71,13.75,10.13,29.07,9.77,44,2.92,14.53-6.66,21.14-19.22,22.32-34.72.47-6.2.08-12.48.08-19.42a14.39,14.39,0,0,0-2.73,2c-19.7,25.91-60.79,27.78-85.69,1.54-26.12-27.55-26.3-81.27,7.68-107.44,24.35-18.76,57.56-15.57,77.53,7.84a6.16,6.16,0,0,0,3.78,2c0-4.23.17-8.46-.05-12.68-.19-3.74,1.36-5.07,5-4.87a74.65,74.65,0,0,0,11,0c4.73-.43,6.37,1.19,6.3,6.11-.27,17.83-.08,35.66-.11,53.5,0,23.67.25,47.35-.32,71-.8,32.89-23.75,57.09-56.45,60.44A26.41,26.41,0,0,0,1208,667Zm50-127.58c-.58-4.61-.86-9.29-1.79-13.83a42.26,42.26,0,0,0-37.31-33.75c-16.16-1.75-33.25,8.46-40.62,24.47-5.34,11.62-5.79,23.83-3.48,36.18,5.94,31.62,42.76,45.77,66.74,25.67C1242.58,568.08,1246.76,554.62,1247,539.42Z" transform="translate(-446 -413)"></path>
<path id="whoogle-w" d="M447.16,414.27c7.7,0,15-.19,22.21.19,1.14.06,2.68,2.56,3.12,4.19,6.13,22.44,12.1,44.92,18.13,67.39q9.88,36.84,19.81,73.66a9.31,9.31,0,0,0,2.68,4.69c.72-1.73,1.56-3.41,2.15-5.18q19-57,37.79-114.11c1.25-3.83,2.88-5.45,7-5.08,5.59.5,12.55-1.42,16.45,1.28,3.67,2.53,4.24,9.67,6,14.86q17.14,51.58,34.21,103.21a10,10,0,0,0,3.16,4.88c.55-1.58,1.2-3.14,1.62-4.75q17.87-70,35.6-140.11c1-3.94,2.38-5.52,6.59-5.25,6.12.4,12.27.11,19.19.11-2.18,8.4-4.17,16.2-6.24,24q-21.5,80.68-42.93,161.39c-1,3.92-2.64,5.48-6.79,5.11a80.69,80.69,0,0,0-14,0c-4,.34-5.45-1.39-6.58-4.89q-18.43-57.2-37.12-114.31c-.74-2.28-1.61-4.53-2.42-6.79l-1.35-.06c-.63,1.55-1.37,3.07-1.89,4.67-12.61,38.55-25.29,77.07-37.66,115.7-1.46,4.55-3.42,6.11-8,5.68a82,82,0,0,0-13.48,0c-3.49.26-5-1-5.92-4.29Q473.31,509.34,448,418.3C447.73,417.23,447.55,416.12,447.16,414.27Z" transform="translate(-446 -413)"></path>
<path id="whoogle-e" d="M1473.38,543.71H1370c-1.76,17,10.15,34.71,27.23,40.92,19.71,7.17,36.84.69,50.55-19.53l20.94,8.68c-3.41,5-6,9.87-9.54,13.92-14.33,16.55-32.82,21.92-54.24,20.46-31.5-2.16-54.12-27.08-58.1-54.81-3.32-23.16.63-44.51,16.45-62.6,17.64-20.17,40.22-24.66,65-18.14,23.9,6.3,37.23,23.47,42.31,47.12C1472.22,527.26,1472.43,535.09,1473.38,543.71Zm-26.69-19.8c2.09-14-14.21-30.54-31.43-32.19-22.21-2.13-43.06,13.12-43.63,32.19Z" transform="translate(-446 -413)"></path>
<path id="whoogle-h" d="M727.34,492.64c.95-1.26,1.85-2.57,2.88-3.77,14.53-17,32.94-21.55,54.11-16.51,17,4.07,29.54,19.1,32.34,38.55a101.29,101.29,0,0,1,1.06,13.91c.11,24.84.06,49.68.06,74.52v4.87H794.3v-5.6c0-24,.06-48-.07-72a55.72,55.72,0,0,0-1.46-12.34c-2.59-10.91-9.13-18.42-20.26-21.14-12.81-3.11-24.55-1.29-34,8.78-8,8.54-11.75,18.87-11.82,30.46-.12,21.84,0,43.68,0,65.52v6.36h-23V414.65h22.53v77.44Z" transform="translate(-446 -413)"></path>
<path id="whoogle-o-1" d="M907.27,470.17c38.82,0,66.44,28.93,66.41,69.47,0,39.73-28.29,69-66.67,69-38.65,0-66.78-29.5-66.72-70C840.35,499,868.62,470.13,907.27,470.17Zm43.24,69.26c-.43-3.79-.72-7.61-1.31-11.37-2.94-18.67-19.1-34.56-36.86-36.35-19.93-2-37.94,8.92-45,27.58-3.74,9.85-4.19,20-2.68,30.44,4,27.42,32.55,44.52,57.87,34.41C939.6,577.32,950.2,560.25,950.51,539.43Z" transform="translate(-446 -413)"></path>
<path id="whoogle-o-2" d="M989.49,539.48c.23-30.89,16.75-56.81,43.45-65.52,49.13-16,89.09,17.94,90,62.12.49,24.62-7.16,45.4-27.31,60.14-34.64,25.34-93.66,12.42-104.35-41.39C990.25,549.8,990.06,544.6,989.49,539.48Zm110.22-.09c-.48-4.29-.7-8.62-1.5-12.84-3.43-18.06-19.37-33.16-36.57-34.84-20.05-2-37.75,8.9-45,27.62-3.51,9.06-3.74,18.45-3,28,2.23,27.4,30.07,46.21,55.87,37.67C1088,578.9,1099.32,561.53,1099.71,539.39Z" transform="translate(-446 -413)"></path>
<path id="whoogle-l" d="M1323.3,604.43h-22.65V414.62h22.65Z" transform="translate(-446 -413)"></path>
<path class="cls-1" d="M1247,539.42c-.24,15.2-4.42,28.66-16.46,38.74-24,20.1-60.8,6-66.74-25.67-2.31-12.35-1.86-24.56,3.48-36.18,7.37-16,24.46-26.22,40.62-24.47a42.26,42.26,0,0,1,37.31,33.75C1246.14,530.13,1246.42,534.81,1247,539.42Z" transform="translate(-446 -413)"></path>
<path class="cls-1" d="M1446.69,523.91h-75.06c.57-19.07,21.42-34.32,43.63-32.19C1432.48,493.37,1448.78,509.88,1446.69,523.91Z" transform="translate(-446 -413)"></path>
<path class="cls-1" d="M950.51,539.43c-.31,20.82-10.91,37.89-28,44.71-25.32,10.11-53.89-7-57.87-34.41-1.51-10.43-1.06-20.59,2.68-30.44,7.08-18.66,25.09-29.59,45-27.58,17.76,1.79,33.92,17.68,36.86,36.35C949.79,531.82,950.08,535.64,950.51,539.43Z" transform="translate(-446 -413)"></path>
<path class="cls-1" d="M1099.71,539.39c-.39,22.14-11.74,39.51-30.16,45.6-25.8,8.54-53.64-10.27-55.87-37.67-.78-9.54-.55-18.93,3-28,7.25-18.72,24.95-29.59,45-27.62,17.2,1.68,33.14,16.78,36.57,34.84C1099,530.77,1099.23,535.1,1099.71,539.39Z" transform="translate(-446 -413)"></path>
</svg>
<img class="owacon-logo" src="/static/img/owacon.png" alt="オワコン" />

変更前

幅:  |  高さ:  |  サイズ: 7.4 KiB

変更後

幅:  |  高さ:  |  サイズ: 76 B

ファイルの表示

@ -17,9 +17,6 @@
{% if search_type %}
<Param name="tbm" value="{{ search_type }}"/>
{% endif %}
{% if preferences %}
<Param name="preferences" value="{{ preferences }}"/>
{% endif %}
</Url>
<Url type="application/x-suggestions+json" {{ request_type|safe }} template="{{ main_url }}/autocomplete">
<Param name="q" value="{searchTerms}"/>

ファイルの表示

@ -7,7 +7,7 @@
autocapitalize="none"
spellcheck="false"
autocorrect="off"
placeholder="Whoogle Search"
placeholder="オワコン検索"
autocomplete="off"
dir="auto">
<input type="submit" style="width: 9%" id="search-submit" value="Search">

ファイルの表示

@ -8,6 +8,7 @@ import os
import urllib.parse as urlparse
from urllib.parse import parse_qs
import re
import warnings
SKIP_ARGS = ['ref_src', 'utm']
SKIP_PREFIX = ['//www.', '//mobile.', '//m.', 'www.', 'mobile.', 'm.']

5
misc/replit.py ノーマルファイル
ファイルの表示

@ -0,0 +1,5 @@
import subprocess
# A plague upon Replit and all who have built it
replit_cmd = "killall -q python3 > /dev/null 2>&1; pip install -r requirements.txt && ./run"
subprocess.run(replit_cmd, shell=True)

6
run
ファイルの表示

@ -26,11 +26,11 @@ else
mkdir -p "$STATIC_FOLDER"
if [ ! -z "$UNIX_SOCKET" ]; then
python3 -um app \
/home/whoogle/whoogle/venv/bin/python3 -um app \
--unix-socket "$UNIX_SOCKET"
else
python3 -um app \
/home/whoogle/whoogle/venv/bin/python3 -um app \
--host "${ADDRESS:-0.0.0.0}" \
--port "${PORT:-"${EXPOSE_PORT:-5000}"}"
--port "${PORT:-"${EXPOSE_PORT:-5384}"}"
fi
fi