Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
infra
spot
Commits
0ac11777
Unverified
Commit
0ac11777
authored
Jan 29, 2019
by
Noémi Ványi
Committed by
GitHub
Jan 29, 2019
Browse files
Merge pull request #1501 from bourrel/remove_asksteem
Remove asksteem
parents
c4f16547
bf4a38ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
searx/engines/asksteem.py
deleted
100644 → 0
View file @
c4f16547
"""
Asksteem (general)
@website https://asksteem.com/
@provide-api yes
@using-api yes
@results JSON (https://github.com/Hoxly/asksteem-docs/wiki)
@stable yes
@parse url, title, content
"""
from
json
import
loads
from
searx.url_utils
import
urlencode
# engine dependent config
categories
=
[
'general'
]
paging
=
True
language_support
=
False
disabled
=
True
# search-url
search_url
=
'https://api.asksteem.com/search?{params}'
result_url
=
'https://steemit.com/@{author}/{title}'
# do search-request
def
request
(
query
,
params
):
url
=
search_url
.
format
(
params
=
urlencode
({
'q'
:
query
,
'pg'
:
params
[
'pageno'
]}))
params
[
'url'
]
=
url
return
params
# get response from search-request
def
response
(
resp
):
json
=
loads
(
resp
.
text
)
results
=
[]
for
result
in
json
.
get
(
'results'
,
[]):
results
.
append
({
'url'
:
result_url
.
format
(
author
=
result
[
'author'
],
title
=
result
[
'permlink'
]),
'title'
:
result
[
'title'
],
'content'
:
result
[
'summary'
]})
return
results
searx/settings.yml
View file @
0ac11777
...
...
@@ -70,10 +70,6 @@ engines:
categories
:
science
timeout
:
4.0
-
name
:
asksteem
engine
:
asksteem
shortcut
:
as
-
name
:
base
engine
:
base
shortcut
:
bs
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment