Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
avpnusr committed Mar 27, 2021
2 parents 0f6bdeb + 672ac91 commit 2b8a9b9
Show file tree
Hide file tree
Showing 50 changed files with 246 additions and 111 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ RUN apk upgrade --no-cache \
openssl-dev \
tar \
git \
protoc \
protobuf-dev \
&& apk add --no-cache \
ca-certificates \
su-exec \
Expand All @@ -55,7 +53,6 @@ RUN apk upgrade --no-cache \
uwsgi \
uwsgi-python3 \
brotli \
protobuf \
&& pip3 install --upgrade pip \
&& pip3 install --no-cache -r requirements.txt \
&& apk del build-dependencies \
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ pylint==2.7.2
splinter==0.14.0
transifex-client==0.14.2
selenium==3.141.0
twine==3.3.0
twine==3.4.1
Pallets-Sphinx-Themes==1.2.3
Sphinx==3.5.2
sphinx-issues==1.2.0
sphinx-jinja==1.1.1
sphinx-tabs==2.1.0
sphinxcontrib-programoutput==0.16
sphinx-autobuild==2020.9.1
linuxdoc==20210110
linuxdoc==20210324
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ flask-babel==2.0.0
flask==1.1.2
idna==2.10
jinja2==2.11.3
lxml==4.6.2
lxml==4.6.3
pygments==2.8.0
python-dateutil==2.8.1
pyyaml==5.4.1
Expand Down
3 changes: 2 additions & 1 deletion searx/engines/duckduckgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
url_ping = 'https://duckduckgo.com/t/sl_h'
time_range_dict = {'day': 'd',
'week': 'w',
'month': 'm'}
'month': 'm',
'year': 'y'}

# specific xpath variables
result_xpath = '//div[@class="result results_links results_links_deep web-result "]' # noqa
Expand Down
4 changes: 1 addition & 3 deletions searx/engines/ina.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ def response(resp):

# we get html in a JSON container...
response = loads(resp.text)
if "content" not in response:
return []
dom = html.fromstring(response["content"])
dom = html.fromstring(response)

# parse results
for result in dom.xpath(results_xpath):
Expand Down
2 changes: 1 addition & 1 deletion searx/engines/soundcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_client_id():
app_js_urls = [script_tag.get('src') for script_tag in script_tags if script_tag is not None]

# extracts valid app_js urls from soundcloud.com content
for app_js_url in app_js_urls:
for app_js_url in app_js_urls[::-1]:
# gets app_js and searches for the clientid
response = http_get(app_js_url)
if response.ok:
Expand Down
1 change: 0 additions & 1 deletion searx/engines/youtube_noapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def request(query, params):
if params['time_range'] in time_range_dict:
params['url'] += time_range_url.format(time_range=time_range_dict[params['time_range']])
else:
print(params['engine_data']['next_page_token'])
params['url'] = next_page_url
params['method'] = 'POST'
params['data'] = dumps({
Expand Down
31 changes: 16 additions & 15 deletions searx/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,9 @@ engines:
- name : google play apps
engine : xpath
search_url : https://play.google.com/store/search?q={query}&c=apps
results_xpath : '//div[@class="WHE7ib mpg5gc"]'
title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a'
url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href'
results_xpath : '//div[@class="ImZGtf mpg5gc"]'
title_xpath : './/div[@class="RZEgze"]//div[@class="kCSSQe"]//a'
url_xpath : './/div[@class="RZEgze"]//div[@class="kCSSQe"]//a/@href'
content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]'
thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]//img/@data-src'
categories : files
Expand All @@ -563,10 +563,10 @@ engines:
- name : google play movies
engine : xpath
search_url : https://play.google.com/store/search?q={query}&c=movies
results_xpath : '//div[@class="WHE7ib mpg5gc"]'
title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a'
url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href'
content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]'
results_xpath : '//div[@class="ImZGtf mpg5gc"]'
title_xpath : './/div[@class="RZEgze"]//div[@class="kCSSQe"]//a'
url_xpath : './/div[@class="RZEgze"]//div[@class="kCSSQe"]//a/@href'
content_xpath : './/div[@class="kCSSQe"]'
thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]//img/@data-src'
categories : videos
shortcut : gpm
Expand All @@ -582,7 +582,7 @@ engines:
- name : geektimes
engine : xpath
paging : True
search_url : https://geektimes.ru/search/page{pageno}/?q={query}
search_url : https://habr.com/en/search/page{pageno}/?q={query}
url_xpath : //article[contains(@class, "post")]//a[@class="post__title_link"]/@href
title_xpath : //article[contains(@class, "post")]//a[@class="post__title_link"]
content_xpath : //article[contains(@class, "post")]//div[contains(@class, "post__text")]
Expand Down Expand Up @@ -618,13 +618,13 @@ engines:
results: HTML

- name : hoogle
engine : json_engine
engine : xpath
paging : True
search_url : https://www.haskell.org/hoogle/?mode=json&hoogle={query}&start={pageno}
results_query : results
url_query : location
title_query : self
content_query : docs
search_url : https://hoogle.haskell.org/?hoogle={query}&start={pageno}
results_xpath : '//div[@class="result"]'
title_xpath : './/div[@class="ans"]//a'
url_xpath : './/div[@class="ans"]//a/@href'
content_xpath : './/div[@class="from"]'
page_size : 20
categories : it
shortcut : ho
Expand Down Expand Up @@ -690,7 +690,7 @@ engines:
content_xpath : .//a[@class="domain"]
categories : it
shortcut : lo
timeout : 3.0
timeout : 5.0
disabled: True
about:
website: https://lobste.rs/
Expand Down Expand Up @@ -1257,6 +1257,7 @@ engines:
# engine : yacy
# shortcut : ya
# base_url : 'http://localhost:8090'
# enable_http: True # required if you aren't using HTTPS for your local yacy instance
# number_of_results : 5
# timeout : 3.0

Expand Down
2 changes: 1 addition & 1 deletion searx/static/themes/oscar/css/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searx/static/themes/oscar/css/bootstrap.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searx/static/themes/oscar/css/leaflet.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searx/static/themes/oscar/css/leaflet.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 16 additions & 11 deletions searx/static/themes/oscar/css/logicodev-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,7 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
background-color: white;
border: #888 1px solid;
color: #666;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAQAAACR313BAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZ
cwAABFkAAARZAVnbJUkAAAAHdElNRQfgBxgLDwB20OFsAAAAbElEQVQY073OsQ3CMAAEwJMYwJGn
sAehpoXJItltBkmcdZBYgIIiQoLglnz3ui+eP+bk5uneteTMZJa6OJuIqvYzSJoqwqBq8gdmTTW8
6/dghxAUq4xsVYT9laBYXCw93Aajh7GPEF23t4fkBYevGFTANkPRAAAAJXRFWHRkYXRlOmNyZWF0
ZQAyMDE2LTA3LTI0VDExOjU1OjU4KzAyOjAwRFqFOQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNi0w
Ny0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb
7jwaAAAAAElFTkSuQmCC) 96% no-repeat;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAQAAACR313BAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAABFkAAARZAVnbJUkAAAAHdElNRQfgBxgLDwB20OFsAAAAbElEQVQY073OsQ3CMAAEwJMYwJGnsAehpoXJItltBkmcdZBYgIIiQoLglnz3ui+eP+bk5uneteTMZJa6OJuIqvYzSJoqwqBq8gdmTTW86/dghxAUq4xsVYT9laBYXCw93Aajh7GPEF23t4fkBYevGFTANkPRAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE2LTA3LTI0VDExOjU1OjU4KzAyOjAwRFqFOQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNi0wNy0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC) 96% no-repeat;
}
.custom-select-rtl {
background-position-x: 4%;
Expand All @@ -455,11 +448,8 @@ Ny0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb
height: 1px;
width: 1px;
overflow: hidden;
clip: rect(1px 1px 1px 1px);
/* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
white-space: nowrap;
/* added line */
}
.label-danger,
.btn-danger {
Expand Down Expand Up @@ -898,3 +888,18 @@ p {
input.cursor-text {
margin: 10px 0;
}
.engine-tooltip {
display: none;
position: absolute;
padding: 0.5rem 1rem;
margin: 0rem 0 0 2rem;
border: 1px solid #ddd;
background: white;
font-size: 14px;
font-weight: normal;
z-index: 1000000;
}
th:hover .engine-tooltip,
.engine-tooltip:hover {
display: inline-block;
}
2 changes: 1 addition & 1 deletion searx/static/themes/oscar/css/logicodev-dark.min.css

Large diffs are not rendered by default.

0 comments on commit 2b8a9b9

Please sign in to comment.