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
f77600a7
authored
Mar 12, 2021
by
Michelle Awh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of mit.cs.uchicago.edu:mawh/project_kitty
parents
f0978ef8
41119b77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
expert_data.py
rating.py
expert_data.py
0 → 100644
View file @
f77600a7
def
expert_data
(
soup
):
"""
Take a soup object and return a string if it has an
expert co-author or if it has been quality tested
Input: soup object
Returns: String
"""
expert
=
soup
.
find
(
"div"
,
class_
=
"sp_coauthor_label"
)
if
expert
!=
None
:
if
"Co-authored"
in
expert
.
text
:
return
"Expert Co-authored"
elif
"Tested"
in
expert
.
text
:
return
"Quality Tested"
\ No newline at end of file
rating.py
View file @
f77600a7
...
...
@@ -139,3 +139,18 @@ def scrape_words(url):
return
" "
.
join
(
text
)
def
expert_data
(
soup
):
"""
Take a soup object and return a string if it has an
expert co-author or if it has been quality tested
Input: soup object
Returns: String
"""
expert
=
soup
.
find
(
"div"
,
class_
=
"sp_coauthor_label"
)
if
expert
!=
None
:
if
"Co-authored"
in
expert
.
text
:
return
"Expert Co-authored"
elif
"Tested"
in
expert
.
text
:
return
"Quality Tested"
\ No newline at end of file
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