Commit 1d3db92f authored by Nicholas Anderson's avatar Nicholas Anderson
Browse files

Load https svg instead of http png

parent 3777ff49
......@@ -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)
url += "&page={page}".format(page=page)
group=group,
page=page)
current_page = requests.get(url)
soup = BeautifulSoup(current_page.content)
......@@ -37,9 +37,10 @@ def call_standard(search, group="all", page=1):
email_match = re.match("Email: (.*)", content)
if email_match:
current_result['email'] = email_match.group(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
......@@ -48,8 +49,9 @@ def call_standard(search, group="all", page=1):
# comment the line below to debug
del current_result["raw"]
people.append(current_result)
return {
'results': people,
'hasNextPage': bool(soup.find('li', {'class': 'next'}))
}
......@@ -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.png" class="srct-logo">PeopleFinder API</a></h1>
<h1><a href="#"><img src="https://bookshare.srct.gmu.edu/static/img/SRCT_square.svg" class="srct-logo">PeopleFinder API</a></h1>
</li>
</ul>
</nav>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment