Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Michelle Awh
/
project_kitty
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
08bda44f
authored
Mar 10, 2021
by
Chris Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GUI draft
parent
54469afe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
SearchResults.py
SearchResults.py
View file @
08bda44f
...
...
@@ -129,8 +129,8 @@ class SearchResults:
return
False
except
:
pass
if
'views'
in
self
.
__filters
:
if
self
.
__filters
[
'views'
]
>
outer_article
.
views
:
if
'
num_
views'
in
self
.
__filters
:
if
self
.
__filters
[
'
num_
views'
]
>
outer_article
.
views
:
return
False
return
True
...
...
@@ -153,8 +153,12 @@ class SearchResults:
forbidden_words
[
0
]
=
forbidden_words
[
0
][
1
:]
return
forbidden_words
inappropiate_words
=
[]
def
passes_all_filters
(
self
,
article
):
if
'child_safe'
in
self
.
__filters
:
if
self
.
__filters
[
'child_safe'
]:
self
.
__forbidden_words
+=
inappropiate_words
if
'pct_helpful'
in
self
.
__filters
:
if
article
.
pct_helpful
<
self
.
__filters
[
'pct_helpful'
]:
return
False
...
...
Write
Preview
Markdown
is supported
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