Address Book

(due: Thursday, November 16, 8:00 AM)

The Faculty and Staff Directory webpage of the UB School of Pharmacy lists names of faculty and staff members of the school. The name of each person is linked to a webpage with information about that person.

Project

Using requests and regular expressions write code that retrieves name, office address, phone number, and e-mail of each person listed in the staff and faculty directory. Your code should print this information for each person (in alphabetical order) in a format similar to the following:


Brown, Alice B5-123A NYS Center of Excellence Buffalo, NY (716) 555-1234 abrown123@buffalo.edu

Chase, Joseph 555 Kapoor Hall Buffalo, NY 14214-8033 (716) 555-3210 josech@buffalo.edu

The sample listings above are made up, they do not correspond to the real information posted on the School of Pharmacy website.

Note 1. Reports that print contact information that was manually entered into the report code are not acceptable.

Note 2. Your code needs to handle the following issues:

  • Individual pages of some people are missing some or all contact information. In such cases the listing you produce should indicate it e.g. as follows:


Brown, Alice No Address (716) 555-1234 abrown123@buffalo.edu

Chase, Joseph No Address No Phone No E-mail

  • The number of lines in the office address can vary, depending on a person.

  • Phone numbers are listed on web pages in different formats: (716) 555-1234, or 716-555-1234, or 7165551234 etc. Your code should capture all phone numbers regardless how they were entered, and print them out in the format (716) 555-1234.

Note 3. This is a programming project. Your project report does not need include narrative, beyond comments explaining how your code works. The project will be graded according to the following rubrics:

  • Code that successfully decrypts the text file: 70%

  • Report organization and code documentation: 30%