# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
# extract the staff names from the profiles directory in the format firstname.lastname
# -

import re
import requests
from bs4 import BeautifulSoup

url = "http://profiles.ucsf.edu/sitemap.xml"

r = requests.get(url)
soup = BeautifulSoup(r.text, "lxml")

names = soup.find_all('loc')

# +
#print(names)
# -

staff_names = []
for n in names:
    print(str(n).split('/')[3][:-1])
    staff_names.append(str(n).split('/')[3][:-1])

for i in range(10, len(staff_names)):
    print(staff_names[i])



StarcoderdataJupyterScriptsDedupFiltered