1
0
Fork 0

Compare commits

...

5 Commits

Author SHA1 Message Date
Markus Heiser 23d3e2ab6c
Merge 2bae3b04e0 into 42b58eb448 2024-04-27 08:57:26 +02:00
Bnyro 42b58eb448 [feat] media.ccc.de: implement module with pagination and iframe 2024-04-27 08:55:26 +02:00
dependabot[bot] a56b4a1648 [upd] pypi: Bump pallets-sphinx-themes from 2.1.1 to 2.1.2
Bumps [pallets-sphinx-themes](https://github.com/pallets/pallets-sphinx-themes) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/pallets/pallets-sphinx-themes/releases)
- [Changelog](https://github.com/pallets/pallets-sphinx-themes/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/pallets-sphinx-themes/compare/2.1.1...2.1.2)

---
updated-dependencies:
- dependency-name: pallets-sphinx-themes
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 08:30:17 +02:00
dependabot[bot] 4719c004ea [upd] pypi: Bump redis from 5.0.3 to 5.0.4
Bumps [redis](https://github.com/redis/redis-py) from 5.0.3 to 5.0.4.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v5.0.3...v5.0.4)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 08:24:23 +02:00
Markus Heiser 2bae3b04e0 [fix] yep engine: invcrease timeout from defaul 3sec to 5sec
In the "Engines" tab on searx.space [1] nearly all engines report a

    TimeoutException: yep engine

As documented in issue #2444 [2], this problem can be fixed by increasing the
timeout. Note: on a local instance (`make run`) the timeout of 3sec was
sufficient / at least in my local test, but the balance of searx.space leads me
to believe that this tight timeout is usually not sufficient.

[1] https://searx.space/
[2] https://github.com/searxng/searxng/issues/2444

Closes https://github.com/searxng/searxng/issues/3421
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-26 08:20:05 +02:00
4 changed files with 65 additions and 23 deletions

View File

@ -5,7 +5,7 @@ black==24.3.0
pylint==3.1.0
splinter==0.21.0
selenium==4.20.0
Pallets-Sphinx-Themes==2.1.1
Pallets-Sphinx-Themes==2.1.2
Sphinx<=7.1.2; python_version == '3.8'
Sphinx==7.2.6; python_version > '3.8'
sphinx-issues==4.1.0

View File

@ -12,7 +12,7 @@ Brotli==1.1.0
uvloop==0.19.0
httpx-socks[asyncio]==0.7.7
setproctitle==1.3.3
redis==5.0.3
redis==5.0.4
markdown-it-py==3.0.0
fasttext-predict==0.9.2.2
pytomlpp==1.0.13

View File

@ -0,0 +1,54 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""media.ccc.de"""
import datetime
from urllib.parse import urlencode
from dateutil import parser
about = {
'website': 'https://media.ccc.de',
'official_api_documentation': 'https://github.com/voc/voctoweb',
'use_official_api': True,
'require_api_key': False,
'results': 'JSON',
}
categories = ['videos']
paging = True
api_url = "https://api.media.ccc.de"
def request(query, params):
args = {'q': query, 'page': params['pageno']}
params['url'] = f"{api_url}/public/events/search?{urlencode(args)}"
return params
def response(resp):
results = []
for item in resp.json()['events']:
publishedDate = None
if item.get('date'):
publishedDate = parser.parse(item['date'])
iframe_src = None
if len(item['recordings']) > 0:
iframe_src = item['recordings'][0]['recording_url']
results.append(
{
'template': 'videos.html',
'url': item['frontend_link'],
'title': item['title'],
'content': item['description'],
'thumbnail': item['thumb_url'],
'publishedDate': publishedDate,
'length': datetime.timedelta(seconds=item['length']),
'iframe_src': iframe_src,
}
)
return results

View File

@ -438,32 +438,19 @@ engines:
shortcut: bt
disabled: true
- name: ccc-tv
engine: xpath
paging: false
search_url: https://media.ccc.de/search/?q={query}
url_xpath: //div[@class="caption"]/h3/a/@href
title_xpath: //div[@class="caption"]/h3/a/text()
content_xpath: //div[@class="caption"]/h4/@title
categories: videos
disabled: true
shortcut: c3tv
about:
website: https://media.ccc.de/
wikidata_id: Q80729951
official_api_documentation: https://github.com/voc/voctoweb
use_official_api: false
require_api_key: false
results: HTML
# We don't set language: de here because media.ccc.de is not just
# for a German audience. It contains many English videos and many
# German videos have English subtitles.
- name: openverse
engine: openverse
categories: images
shortcut: opv
- name: media.ccc.de
engine: ccc_media
shortcut: c3tv
# We don't set language: de here because media.ccc.de is not just
# for a German audience. It contains many English videos and many
# German videos have English subtitles.
disabled: true
- name: chefkoch
engine: chefkoch
shortcut: chef
@ -508,6 +495,7 @@ engines:
shortcut: yep
categories: general
search_type: web
timeout: 5
disabled: true
- name: yep images