Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
PeopleFinderAPI
Commits
1d3db92f
Commit
1d3db92f
authored
Sep 10, 2015
by
Nicholas Anderson
Browse files
Load https svg instead of http png
parent
3777ff49
Changes
2
Show whitespace changes
Inline
Side-by-side
peoplefinder.py
View file @
1d3db92f
...
...
@@ -10,12 +10,12 @@ MODE = {
def
call_standard
(
search
,
group
=
"all"
,
page
=
1
):
url
=
"{base}?search={search}&group={group}&people=100"
.
format
(
url
=
"{base}?search={search}&group={group}&people=100
&page={page}
"
.
format
(
base
=
BASE_URL
,
search
=
search
,
group
=
group
)
group
=
group
,
page
=
page
)
url
+=
"&page={page}"
.
format
(
page
=
page
)
current_page
=
requests
.
get
(
url
)
soup
=
BeautifulSoup
(
current_page
.
content
)
...
...
@@ -40,6 +40,7 @@ def call_standard(search, group="all", page=1):
if
attribute
.
acronym
:
current_result
[
'address'
]
=
attribute
.
text
elif
attribute
.
span
:
phone
=
attribute
.
find
(
'span'
,
{
'class'
:
'phone'
})
current_result
[
'phone'
]
=
phone
.
text
if
phone
else
None
...
...
@@ -53,3 +54,4 @@ def call_standard(search, group="all", page=1):
'results'
:
people
,
'hasNextPage'
:
bool
(
soup
.
find
(
'li'
,
{
'class'
:
'next'
}))
}
templates/index.html
View file @
1d3db92f
...
...
@@ -49,7 +49,7 @@ dd {
<nav
class=
"top-bar"
data-topbar
role=
"navigation"
>
<ul
class=
"title-area"
>
<li
class=
"name"
>
<h1><a
href=
"#"
><img
src=
"http://srct.gmu.edu/static/img/SRCT_square
_white.pn
g"
class=
"srct-logo"
>
PeopleFinder API
</a></h1>
<h1><a
href=
"#"
><img
src=
"http
s
://
bookshare.
srct.gmu.edu/static/img/SRCT_square
.sv
g"
class=
"srct-logo"
>
PeopleFinder API
</a></h1>
</li>
</ul>
</nav>
...
...
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