summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2025-08-03 10:49:14 +0200
committerGitHub <noreply@github.com>2025-08-03 10:49:14 +0200
commit2e62eb5d68d875c49e32229103a4fd75fe26c104 (patch)
tree9ae561a6ad6cd0877ca60eff0d8de291e85dd63c /searx
parent3d964144825c2c53916d0a14235ef7250f0dbc1c (diff)
[fix] engine yummly: website were taken offline in December 2024 (#5080)
The app and website were taken offline in December 2024, with the latter pointing to KitchenAid's US website. [1] [1] https://en.wikipedia.org/wiki/Yummly Closes: https://github.com/searxng/searxng/issues/5079
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/yummly.py78
-rw-r--r--searx/settings.yml5
2 files changed, 0 insertions, 83 deletions
diff --git a/searx/engines/yummly.py b/searx/engines/yummly.py
deleted file mode 100644
index 3f86baabe..000000000
--- a/searx/engines/yummly.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# SPDX-License-Identifier: AGPL-3.0-or-later
-"""Yummly
-"""
-
-from urllib.parse import urlencode
-
-from flask_babel import gettext
-from searx.utils import markdown_to_text
-
-about = {
- "website": 'https://yummly.com',
- "wikidata_id": 'Q8061140',
- # not used since it requires an api key
- "official_api_documentation": 'https://developer.yummly.com/documentation.html',
- "use_official_api": False,
- "require_api_key": False,
- "results": 'JSON',
-}
-paging = True
-categories = []
-
-api_url = "https://mapi.yummly.com"
-number_of_results = 10
-show_pro_recipes = False
-base_url = "https://www.yummly.com"
-
-
-def request(query, params):
- args = {
- 'q': query,
- 'start': (params['pageno'] - 1) * number_of_results,
- 'maxResult': number_of_results,
- }
-
- params['url'] = f"{api_url}/mapi/v23/content/search?{urlencode(args)}&allowedContent=single_recipe"
-
- return params
-
-
-def response(resp):
- results = []
-
- json = resp.json()
-
- for result in json['feed']:
- # don't show pro recipes since they can't be accessed without an account
- if not show_pro_recipes and result['proRecipe']:
- continue
-
- content = result['seo']['web']['meta-tags']['description']
- description = result['content']['description']
- if description is not None:
- content = markdown_to_text(description['text'])
-
- thumbnail = None
- if result['display']['images']:
- thumbnail = result['display']['images'][0]
- elif result['content']['details']['images']:
- thumbnail = result['content']['details']['images'][0]['resizableImageUrl']
-
- url = result['display']['source']['sourceRecipeUrl']
- if 'www.yummly.com/private' in url:
- url = base_url + '/' + result['tracking-id']
-
- results.append(
- {
- 'url': url,
- 'title': result['display']['displayName'],
- 'content': content,
- 'thumbnail': thumbnail,
- 'metadata': gettext('Language') + f": {result['locale'].split('-')[0]}",
- }
- )
-
- for suggestion in json['relatedPhrases']['keywords']:
- results.append({'suggestion': suggestion})
-
- return results
diff --git a/searx/settings.yml b/searx/settings.yml
index 8ef711b6b..0319191dd 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -2595,11 +2595,6 @@ engines:
shortcut: wttr
timeout: 9.0
- - name: yummly
- engine: yummly
- shortcut: yum
- disabled: true
-
- name: brave
engine: brave
shortcut: br