mirror of
https://github.com/searxng/searxng.git
synced 2026-09-03 04:51:24 +00:00
[mod] engines: migrate to setup() from init() for simple tasks
This commit is contained in:
@@ -75,6 +75,7 @@ Implementations
|
||||
"""
|
||||
|
||||
|
||||
import typing as t
|
||||
from urllib.parse import urlencode
|
||||
from dateutil.parser import parse
|
||||
from searx.utils import html_to_text, humanize_number
|
||||
@@ -115,7 +116,7 @@ def absolute_url(relative_url):
|
||||
return f'{base_url.rstrip("/")}{relative_url}'
|
||||
|
||||
|
||||
def init(_):
|
||||
def setup(_: dict[str, t.Any]) -> bool | None:
|
||||
if not base_url:
|
||||
raise ValueError('tubearchivist engine: base_url is unset')
|
||||
if not ta_token:
|
||||
|
||||
Reference in New Issue
Block a user