mirror of
https://github.com/searxng/searxng.git
synced 2026-05-26 12:50:14 +02:00
[mod] podcastindex: remove engine (#6140)
PodcastIndex.org started using a Proof-of-Work JavaScript challenge whose results are sent as `X-Pow-*` request headers. Although it is technically possible to re-implement the PoW challenge in Python, it's likely impossible to maintain because - the actual Proof of Concept logic might change very often - the whole idea of the Proof of Work challenge is to use a "big" amount of resources (about 1s on my PC); so executing the challenge would almost block all other work on the SearXNG instance At first glance, the challenge looks very similar to what Anubis does, because it also uses SHA256 hashes.
This commit is contained in:
@@ -1,41 +0,0 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
||||||
"""Podcast Index"""
|
|
||||||
|
|
||||||
from urllib.parse import quote_plus
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
about = {
|
|
||||||
'website': 'https://podcastindex.org',
|
|
||||||
'official_api_documentation': None, # requires an account
|
|
||||||
'use_official_api': False,
|
|
||||||
'require_api_key': False,
|
|
||||||
'results': 'JSON',
|
|
||||||
}
|
|
||||||
categories = []
|
|
||||||
|
|
||||||
base_url = "https://podcastindex.org"
|
|
||||||
|
|
||||||
|
|
||||||
def request(query, params):
|
|
||||||
params['url'] = f"{base_url}/api/search/byterm?q={quote_plus(query)}"
|
|
||||||
return params
|
|
||||||
|
|
||||||
|
|
||||||
def response(resp):
|
|
||||||
results = []
|
|
||||||
|
|
||||||
json = resp.json()
|
|
||||||
|
|
||||||
for result in json['feeds']:
|
|
||||||
results.append(
|
|
||||||
{
|
|
||||||
'url': result['link'],
|
|
||||||
'title': result['title'],
|
|
||||||
'content': result['description'],
|
|
||||||
'thumbnail': result['image'],
|
|
||||||
'publishedDate': datetime.fromtimestamp(result['newestItemPubdate']),
|
|
||||||
'metadata': f"{result['author']}, {result['episodeCount']} episodes",
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
return results
|
|
||||||
@@ -1697,10 +1697,6 @@ engines:
|
|||||||
# image proxy of https://pixiv.perennialte.ch
|
# image proxy of https://pixiv.perennialte.ch
|
||||||
# - https://pximg.perennialte.ch
|
# - https://pximg.perennialte.ch
|
||||||
|
|
||||||
- name: podcastindex
|
|
||||||
engine: podcastindex
|
|
||||||
shortcut: podcast
|
|
||||||
|
|
||||||
# Required dependency: psychopg2
|
# Required dependency: psychopg2
|
||||||
# - name: postgresql
|
# - name: postgresql
|
||||||
# engine: postgresql
|
# engine: postgresql
|
||||||
|
|||||||
Reference in New Issue
Block a user