Browse Source

partial commit slight refactor of Class

partial
Raphael Roberts 7 years ago
parent
commit
8ef653634a
  1. 603
      Student Detail Schedule.html
  2. 5
      gcalendar.py
  3. 2
      google_api_wrapper
  4. 3
      requirements.txt
  5. 26
      scraper.py

603
Student Detail Schedule.html

@ -0,0 +1,603 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd">
<HTML lang="en">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" name="Cache-Control" content="no-cache">
<meta http-equiv="Cache-Control" name="Cache-Control" content="no-cache">
<LINK REL="stylesheet" HREF="/css/web_defaultapp.css" TYPE="text/css">
<LINK REL="stylesheet" HREF="/css/web_defaultprint.css" TYPE="text/css" media="print">
<title>Student Detail Schedule</title>
<meta http-equiv="Content-Script-Type" name="Default_Script_Language" content="text/javascript">
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!-- Hide JavaScript from older browsers
window.onunload = function() {submitcount=0;}
var submitcount=0;
function checkSubmit() {
if (submitcount == 0)
{
submitcount++;
return true;
}
else
{
alert("Your changes have already been submitted.");
return false;
}
}
// End script hiding -->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!-- Hide JavaScript from older browsers
// Function to open a window
function windowOpen(window_url) {
helpWin = window.open(window_url,'','toolbar=yes,status=no,scrollbars=yes,menubar=yes,resizable=yes,directories=no,location=no,width=350,height=400');
if (document.images) {
if (helpWin) helpWin.focus()
}
}
// End script hiding -->
</SCRIPT>
</head>
<body>
<div class="headerwrapperdiv">
<div class="pageheaderdiv1">
<a href="#main_content" onMouseover="window.status='Go to Main Content'; return true" onMouseout="window.status=''; return true" OnFocus="window.status='Go to Main Content'; return true" onBlur="window.status=''; return true" class="skiplinks">Go to Main Content</a>
<h1>SCT WWW Information System</h1></DIV><div class="headerlinksdiv">
<SPAN class="pageheaderlinks2">
<map name="Module_Navigation_Links_H" title="Module Navigation Links">
<p>
<a href="#skip_Module_Navigation_Links_H" onMouseover="window.status='Skip Module Navigation Links'; return true" onMouseout="window.status=''; return true" onFocus="window.status='Skip Module Navigation Links'; return true" onBlur="window.status=''; return true" class="skiplinks">Skip Module Navigation Links</a>
<table CLASS="plaintable" SUMMARY="This is main table for displaying Tab Items."
WIDTH="100%" cellSpacing=0 cellPadding=0 border=0>
<tr>
<TD CLASS="pldefault">
<table CLASS="plaintable" SUMMARY="This table displays Tab Items."
cellSpacing=0 cellPadding=0 border=0>
<tr>
<td class="taboff" height=22>
<a href="/neiuprod/twbkwbis.P_GenMenu?name=bmenu.P_GenMnu" onMouseover="window.status='Personal Information'; return true" onMouseout="window.status=''; return true" onFocus="window.status='Personal Information'; return true" onBlur="window.status=''; return true" >Personal Information</a>
</TD>
<TD class="bgtaboff" height=22 vAlign="top" align="right">
<img src="/wtlgifs/web_tab_corner_right.gif" alt="Tab Corner Right" CLASS="headerImg" TITLE="Tab Corner Right" NAME="web_tab_corner_right" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=20 WIDTH=8 />
</TD>
<td class="tabon" height=22>
<a href="/neiuprod/twbkwbis.P_GenMenu?name=bmenu.P_StuMainMnu" onMouseover="window.status='Student'; return true" onMouseout="window.status=''; return true" onFocus="window.status='Student'; return true" onBlur="window.status=''; return true" >Student</a>
</TD>
<TD class="bgtabon" height=22 vAlign="top" align="right">
<img src="/wtlgifs/web_tab_corner_right.gif" alt="Tab Corner Right" CLASS="headerImg" TITLE="Tab Corner Right" NAME="web_tab_corner_right" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=20 WIDTH=8 />
</TD>
<td class="taboff" height=22>
<a href="/neiuprod/twbkwbis.P_GenMenu?name=bmenu.P_FinAidMainMnu" onMouseover="window.status='Financial Aid'; return true" onMouseout="window.status=''; return true" onFocus="window.status='Financial Aid'; return true" onBlur="window.status=''; return true" >Financial Aid</a>
</TD>
<TD class="bgtaboff" height=22 vAlign="top" align="right">
<img src="/wtlgifs/web_tab_corner_right.gif" alt="Tab Corner Right" CLASS="headerImg" TITLE="Tab Corner Right" NAME="web_tab_corner_right" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=20 WIDTH=8 />
</TD>
<td class="taboff" height=22>
<a href="/neiuprod/twbkwbis.P_GenMenu?name=bmenu.P_FacMainMnu" onMouseover="window.status='Faculty Services'; return true" onMouseout="window.status=''; return true" onFocus="window.status='Faculty Services'; return true" onBlur="window.status=''; return true" >Faculty Services</a>
</TD>
<TD class="bgtaboff" height=22 vAlign="top" align="right">
<img src="/wtlgifs/web_tab_corner_right.gif" alt="Tab Corner Right" CLASS="headerImg" TITLE="Tab Corner Right" NAME="web_tab_corner_right" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=20 WIDTH=8 />
</TD>
</tr>
</table>
</TD>
</tr>
<tr>
<TD class="bgtabon" width="100%" colSpan=2><img src="/wtlgifs/web_transparent.gif" alt="Transparent Image" CLASS="headerImg" TITLE="Transparent Image" NAME="web_transparent" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=3 WIDTH=10 /></TD></tr></table>
</map>
</SPAN>
<a name="skip_Module_Navigation_Links_H"></a>
</DIV>
<table CLASS="plaintable" SUMMARY="This table displays Menu Items and Banner Search textbox."
WIDTH="100%">
<tr>
<TD CLASS="pldefault">
<div class="headerlinksdiv2">
<form action="/neiuprod/twbksrch.P_ShowResults" method="post">
Search
<SPAN class="fieldlabeltextinvisible"><LABEL for=keyword_in_id><SPAN class="fieldlabeltext">Search</SPAN></LABEL></SPAN>
<input type="text" name="KEYWRD_IN" size="20" maxlength="65" ID="keyword_in_id" />
<input type="submit" value="Go" />
</form>
</div>
</TD>
<TD CLASS="pldefault"><p class="rightaligntext" /p>
<SPAN class="pageheaderlinks">
<a href="/neiuprod/twbkwbis.P_GenMenu?name=bmenu.P_RegMnu" class="submenulinktext2" id="ssbbackurl">RETURN TO MENU</a>
|
<a href="/neiuprod/twbksite.P_DispSiteMap?menu_name_in=bmenu.P_MainMnu&amp;depth_in=2&amp;columns_in=3" accesskey="2" class="submenulinktext2">SITE MAP</a>
|
<a href="/neiuprod/twbkfrmt.P_DispHelp?pagename_in=bwskfshd.P_CrseSchdDetl" accesskey="H" onClick="popup = window.open('/neiuprod/twbkfrmt.P_DispHelp?pagename_in=bwskfshd.P_CrseSchdDetl', 'PopupPage','height=500,width=450,scrollbars=yes,resizable=yes'); return false" target="_blank" onMouseOver="window.status=''; return true" onMouseOut="window.status=''; return true"onFocus="window.status=''; return true" onBlur="window.status=''; return true" class="submenulinktext2">HELP</a>
|
<a href="twbkwbis.P_Logout" accesskey="3" class="submenulinktext2">EXIT</a>
</span>
</TD>
</tr>
</table>
</DIV>
<div class="pagetitlediv">
<table CLASS="plaintable" SUMMARY="This table displays title and static header displays."
WIDTH="100%">
<tr>
<TD CLASS="pldefault">
<h2>Student Detail Schedule</h2>
</TD>
<TD CLASS="pldefault">
&nbsp;
</TD>
<TD CLASS="pldefault"><p class="rightaligntext" /p>
<div class="staticheaders">
000645225 Raphael L. Roberts<br>
Spring 2019<br>
Jan 06, 2019 07:50 pm<br>
</div>
</TD>
</tr>
<tr>
<TD class="bg3" width="100%" colSpan=3><img src="/wtlgifs/web_transparent.gif" alt="Transparent Image" CLASS="headerImg" TITLE="Transparent Image" NAME="web_transparent" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=3 WIDTH=10 /></TD>
</tr>
</table>
<a name="main_content"></a>
</DIV>
<div class="pagebodydiv">
<!-- ** END OF twbkwbis.P_OpenDoc ** -->
<div class="infotextdiv"><table CLASS="infotexttable" SUMMARY="This layout table contains information that may be helpful in understanding the content and functionality of this page. It could be a brief set of instructions, a description of error messages, or other special information."><tr><td CLASS="indefault"><img src="/wtlgifs/web_info_cascade.png" alt="Information" CLASS="headerImg" TITLE="Information" NAME="web_info" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=12 WIDTH=14 /></td><td CLASS="indefault"><SPAN class="infotext"> <b>Class Schedule</b><br>
The <a href="https://www.neiu.edu/academics/registrar-services/class-schedules-and-registration"> Schedule of Classes </a> contains important information you should know including but not limited to: registering for classes, add/drop dates, semester calendars, final exam schedule, tuition/fees rates, and how to make payments or request a payment plan. If there are questions we can answer for you, please contact the <a href="mailto:registration@neiu.edu"> Registration Office.</a><br><br>
Remember to review your class schedule prior to the first day of classes for possible changes in class location and times.<br><br></SPAN></td></tr></table><p></DIV>
Total Credit Hours: 15.000
<br />
<br />
<table CLASS="datadisplaytable" SUMMARY="This layout table is used to present the schedule course detail"><caption class="captiontext">Human Origins: Introduction To Biological Anthropology - ANTH 215 - 1</caption>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Associated Term:</th>
<td CLASS="dddefault">Spring 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" ><ACRONYM title = "Course Reference Number">CRN</ACRONYM>:</th>
<td CLASS="dddefault">24651</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Status:</th>
<td CLASS="dddefault">**Web Registered** on Jan 04, 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Assigned Instructor:</th>
<TD CLASS="dddefault">
Lesa C. Davis<a href="mailto:lcdavis@neiu.edu" target="Lesa C. Davis" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a>
</TD>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Grade Mode:</th>
<td CLASS="dddefault">Standard</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Credits:</th>
<td CLASS="dddefault"> 3.000</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Level:</th>
<td CLASS="dddefault">Undergraduate</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Campus:</th>
<td CLASS="dddefault">Main Campus</td>
</tr>
</table>
<table CLASS="datadisplaytable" SUMMARY="This table lists the scheduled meeting times and assigned instructors for this class.."><caption class="captiontext">Scheduled Meeting Times</caption>
<tr>
<th CLASS="ddheader" scope="col" >Type</th>
<th CLASS="ddheader" scope="col" >Time</th>
<th CLASS="ddheader" scope="col" >Days</th>
<th CLASS="ddheader" scope="col" >Where</th>
<th CLASS="ddheader" scope="col" >Date Range</th>
<th CLASS="ddheader" scope="col" >Schedule Type</th>
<th CLASS="ddheader" scope="col" >Instructors</th>
</tr>
<tr>
<td CLASS="dddefault">Class</td>
<td CLASS="dddefault">11:30 am - 12:45 pm</td>
<td CLASS="dddefault">MW</td>
<td CLASS="dddefault">Bernard J Brommel Hall 156</td>
<td CLASS="dddefault">Jan 07, 2019 - May 07, 2019</td>
<td CLASS="dddefault">Lecture</td>
<td CLASS="dddefault">Lesa C Davis (<ABBR title= "Primary">P</ABBR>)<a href="mailto:lcdavis@neiu.edu" target="Lesa C. Davis" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a></td>
</tr>
</table>
<br />
<table CLASS="datadisplaytable" SUMMARY="This layout table is used to present the schedule course detail"><caption class="captiontext">Discrete Structures - CS 201 - 2</caption>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Associated Term:</th>
<td CLASS="dddefault">Spring 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" ><ACRONYM title = "Course Reference Number">CRN</ACRONYM>:</th>
<td CLASS="dddefault">24775</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Status:</th>
<td CLASS="dddefault">**Web Registered** on Jan 04, 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Assigned Instructor:</th>
<TD CLASS="dddefault">
Cristina A. Haidau<a href="mailto:C-Haidau@neiu.edu" target="Cristina A. Haidau" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a>
</TD>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Grade Mode:</th>
<td CLASS="dddefault">Standard</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Credits:</th>
<td CLASS="dddefault"> 3.000</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Level:</th>
<td CLASS="dddefault">Undergraduate</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Campus:</th>
<td CLASS="dddefault">Main Campus</td>
</tr>
</table>
<table CLASS="datadisplaytable" SUMMARY="This table lists the scheduled meeting times and assigned instructors for this class.."><caption class="captiontext">Scheduled Meeting Times</caption>
<tr>
<th CLASS="ddheader" scope="col" >Type</th>
<th CLASS="ddheader" scope="col" >Time</th>
<th CLASS="ddheader" scope="col" >Days</th>
<th CLASS="ddheader" scope="col" >Where</th>
<th CLASS="ddheader" scope="col" >Date Range</th>
<th CLASS="ddheader" scope="col" >Schedule Type</th>
<th CLASS="ddheader" scope="col" >Instructors</th>
</tr>
<tr>
<td CLASS="dddefault">Class</td>
<td CLASS="dddefault">4:15 pm - 6:55 pm</td>
<td CLASS="dddefault">M</td>
<td CLASS="dddefault">Lech Walesa Hall 3046</td>
<td CLASS="dddefault">Jan 07, 2019 - May 07, 2019</td>
<td CLASS="dddefault">Lecture</td>
<td CLASS="dddefault">Cristina A Haidau (<ABBR title= "Primary">P</ABBR>)<a href="mailto:C-Haidau@neiu.edu" target="Cristina A. Haidau" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a></td>
</tr>
</table>
<br />
<table CLASS="datadisplaytable" SUMMARY="This layout table is used to present the schedule course detail"><caption class="captiontext">Introduction To Environmental Science - ENVI 101 - 2</caption>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Associated Term:</th>
<td CLASS="dddefault">Spring 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" ><ACRONYM title = "Course Reference Number">CRN</ACRONYM>:</th>
<td CLASS="dddefault">28223</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Status:</th>
<td CLASS="dddefault">**Web Registered** on Jan 04, 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Assigned Instructor:</th>
<TD CLASS="dddefault">
Pamela Geddes<a href="mailto:P-Geddes@neiu.edu" target="Pamela Geddes" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a>
</TD>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Grade Mode:</th>
<td CLASS="dddefault">Standard</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Credits:</th>
<td CLASS="dddefault"> 3.000</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Level:</th>
<td CLASS="dddefault">Undergraduate</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Campus:</th>
<td CLASS="dddefault">Main Campus</td>
</tr>
</table>
<table CLASS="datadisplaytable" SUMMARY="This table lists the scheduled meeting times and assigned instructors for this class.."><caption class="captiontext">Scheduled Meeting Times</caption>
<tr>
<th CLASS="ddheader" scope="col" >Type</th>
<th CLASS="ddheader" scope="col" >Time</th>
<th CLASS="ddheader" scope="col" >Days</th>
<th CLASS="ddheader" scope="col" >Where</th>
<th CLASS="ddheader" scope="col" >Date Range</th>
<th CLASS="ddheader" scope="col" >Schedule Type</th>
<th CLASS="ddheader" scope="col" >Instructors</th>
</tr>
<tr>
<td CLASS="dddefault">Class</td>
<td CLASS="dddefault">2:20 pm - 3:35 pm</td>
<td CLASS="dddefault">M</td>
<td CLASS="dddefault">Bernard J Brommel Hall 135</td>
<td CLASS="dddefault">Jan 07, 2019 - May 07, 2019</td>
<td CLASS="dddefault">Lecture</td>
<td CLASS="dddefault">Pamela Geddes (<ABBR title= "Primary">P</ABBR>)<a href="mailto:P-Geddes@neiu.edu" target="Pamela Geddes" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a></td>
</tr>
<tr>
<td CLASS="dddefault">Class</td>
<td CLASS="dddefault">2:20 pm - 4:25 pm</td>
<td CLASS="dddefault">W</td>
<td CLASS="dddefault">Bernard J Brommel Hall 135</td>
<td CLASS="dddefault">Jan 07, 2019 - May 07, 2019</td>
<td CLASS="dddefault">Lab</td>
<td CLASS="dddefault">Pamela Geddes (<ABBR title= "Primary">P</ABBR>)<a href="mailto:P-Geddes@neiu.edu" target="Pamela Geddes" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a></td>
</tr>
</table>
<br />
<table CLASS="datadisplaytable" SUMMARY="This layout table is used to present the schedule course detail"><caption class="captiontext">Music Theory II - MUS 122 - 1</caption>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Associated Term:</th>
<td CLASS="dddefault">Spring 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" ><ACRONYM title = "Course Reference Number">CRN</ACRONYM>:</th>
<td CLASS="dddefault">25262</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Status:</th>
<td CLASS="dddefault">**Web Registered** on Jan 04, 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Assigned Instructor:</th>
<TD CLASS="dddefault">
Jeffrey F. Kowalkowski<a href="mailto:J-Kowalkowski1@neiu.edu" target="Jeffrey F. Kowalkowski" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a>
</TD>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Grade Mode:</th>
<td CLASS="dddefault">Standard</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Credits:</th>
<td CLASS="dddefault"> 3.000</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Level:</th>
<td CLASS="dddefault">Undergraduate</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Campus:</th>
<td CLASS="dddefault">Main Campus</td>
</tr>
</table>
<table CLASS="datadisplaytable" SUMMARY="This table lists the scheduled meeting times and assigned instructors for this class.."><caption class="captiontext">Scheduled Meeting Times</caption>
<tr>
<th CLASS="ddheader" scope="col" >Type</th>
<th CLASS="ddheader" scope="col" >Time</th>
<th CLASS="ddheader" scope="col" >Days</th>
<th CLASS="ddheader" scope="col" >Where</th>
<th CLASS="ddheader" scope="col" >Date Range</th>
<th CLASS="ddheader" scope="col" >Schedule Type</th>
<th CLASS="ddheader" scope="col" >Instructors</th>
</tr>
<tr>
<td CLASS="dddefault">Class</td>
<td CLASS="dddefault">9:25 am - 10:40 am</td>
<td CLASS="dddefault">TR</td>
<td CLASS="dddefault">Fine Arts Center 145</td>
<td CLASS="dddefault">Jan 07, 2019 - May 07, 2019</td>
<td CLASS="dddefault">Lecture</td>
<td CLASS="dddefault">Jeffrey F Kowalkowski (<ABBR title= "Primary">P</ABBR>)<a href="mailto:J-Kowalkowski1@neiu.edu" target="Jeffrey F. Kowalkowski" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a></td>
</tr>
</table>
<br />
<table CLASS="datadisplaytable" SUMMARY="This layout table is used to present the schedule course detail"><caption class="captiontext">Applied Music: Tuba - MUS 151K - 1</caption>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Associated Term:</th>
<td CLASS="dddefault">Spring 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" ><ACRONYM title = "Course Reference Number">CRN</ACRONYM>:</th>
<td CLASS="dddefault">27420</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Status:</th>
<td CLASS="dddefault">**Web Registered** on Jan 06, 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Assigned Instructor:</th>
<TD CLASS="dddefault">
William R. Russell<a href="mailto:W-Russell1@neiu.edu" target="William R. Russell" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a>
</TD>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Grade Mode:</th>
<td CLASS="dddefault">Standard</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Credits:</th>
<td CLASS="dddefault"> 1.000</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Level:</th>
<td CLASS="dddefault">Undergraduate</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Campus:</th>
<td CLASS="dddefault">Main Campus</td>
</tr>
</table>
<table CLASS="datadisplaytable" SUMMARY="This table lists the scheduled meeting times and assigned instructors for this class.."><caption class="captiontext">Scheduled Meeting Times</caption>
<tr>
<th CLASS="ddheader" scope="col" >Type</th>
<th CLASS="ddheader" scope="col" >Time</th>
<th CLASS="ddheader" scope="col" >Days</th>
<th CLASS="ddheader" scope="col" >Where</th>
<th CLASS="ddheader" scope="col" >Date Range</th>
<th CLASS="ddheader" scope="col" >Schedule Type</th>
<th CLASS="ddheader" scope="col" >Instructors</th>
</tr>
<tr>
<td CLASS="dddefault">Class</td>
<td CLASS="dddefault"><ABBR title = "To Be Announced">TBA</ABBR></td>
<td CLASS="dddefault">&nbsp;</td>
<td CLASS="dddefault"><ABBR title = "To Be Announced">TBA</ABBR></td>
<td CLASS="dddefault">Jan 07, 2019 - May 07, 2019</td>
<td CLASS="dddefault">Lecture</td>
<td CLASS="dddefault">William R Russell (<ABBR title= "Primary">P</ABBR>)<a href="mailto:W-Russell1@neiu.edu" target="William R. Russell" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a></td>
</tr>
</table>
<br />
<table CLASS="datadisplaytable" SUMMARY="This layout table is used to present the schedule course detail"><caption class="captiontext">Band - MUS 231 - 1</caption>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Associated Term:</th>
<td CLASS="dddefault">Spring 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" ><ACRONYM title = "Course Reference Number">CRN</ACRONYM>:</th>
<td CLASS="dddefault">25277</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Status:</th>
<td CLASS="dddefault">**Web Registered** on Jan 04, 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Assigned Instructor:</th>
<TD CLASS="dddefault">
Travis M. Heath<a href="mailto:T-Heath@neiu.edu" target="Travis M. Heath" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a>
</TD>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Grade Mode:</th>
<td CLASS="dddefault">Standard</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Credits:</th>
<td CLASS="dddefault"> 1.000</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Level:</th>
<td CLASS="dddefault">Undergraduate</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Campus:</th>
<td CLASS="dddefault">Main Campus</td>
</tr>
</table>
<table CLASS="datadisplaytable" SUMMARY="This table lists the scheduled meeting times and assigned instructors for this class.."><caption class="captiontext">Scheduled Meeting Times</caption>
<tr>
<th CLASS="ddheader" scope="col" >Type</th>
<th CLASS="ddheader" scope="col" >Time</th>
<th CLASS="ddheader" scope="col" >Days</th>
<th CLASS="ddheader" scope="col" >Where</th>
<th CLASS="ddheader" scope="col" >Date Range</th>
<th CLASS="ddheader" scope="col" >Schedule Type</th>
<th CLASS="ddheader" scope="col" >Instructors</th>
</tr>
<tr>
<td CLASS="dddefault">Class</td>
<td CLASS="dddefault">7:05 pm - 9:45 pm</td>
<td CLASS="dddefault">TR</td>
<td CLASS="dddefault">Fine Arts Center 144</td>
<td CLASS="dddefault">Jan 07, 2019 - May 07, 2019</td>
<td CLASS="dddefault">Lecture</td>
<td CLASS="dddefault">Travis M Heath (<ABBR title= "Primary">P</ABBR>)<a href="mailto:T-Heath@neiu.edu" target="Travis M. Heath" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a></td>
</tr>
</table>
<br />
<table CLASS="datadisplaytable" SUMMARY="This layout table is used to present the schedule course detail"><caption class="captiontext">Instrumental Ensemble:Jazz Band - MUS 235A - 2</caption>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Associated Term:</th>
<td CLASS="dddefault">Spring 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" ><ACRONYM title = "Course Reference Number">CRN</ACRONYM>:</th>
<td CLASS="dddefault">25287</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Status:</th>
<td CLASS="dddefault">**Web Registered** on Jan 04, 2019</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Assigned Instructor:</th>
<TD CLASS="dddefault">
Mayo Tiana<a href="mailto:M-Tiana@neiu.edu" target="Mayo Tiana" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a>
</TD>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Grade Mode:</th>
<td CLASS="dddefault">Standard</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Credits:</th>
<td CLASS="dddefault"> 1.000</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Level:</th>
<td CLASS="dddefault">Undergraduate</td>
</tr>
<tr>
<th colspan="2" CLASS="ddlabel" scope="row" >Campus:</th>
<td CLASS="dddefault">Main Campus</td>
</tr>
</table>
<table CLASS="datadisplaytable" SUMMARY="This table lists the scheduled meeting times and assigned instructors for this class.."><caption class="captiontext">Scheduled Meeting Times</caption>
<tr>
<th CLASS="ddheader" scope="col" >Type</th>
<th CLASS="ddheader" scope="col" >Time</th>
<th CLASS="ddheader" scope="col" >Days</th>
<th CLASS="ddheader" scope="col" >Where</th>
<th CLASS="ddheader" scope="col" >Date Range</th>
<th CLASS="ddheader" scope="col" >Schedule Type</th>
<th CLASS="ddheader" scope="col" >Instructors</th>
</tr>
<tr>
<td CLASS="dddefault">Class</td>
<td CLASS="dddefault">1:40 pm - 2:55 pm</td>
<td CLASS="dddefault">TR</td>
<td CLASS="dddefault">Fine Arts Center 144</td>
<td CLASS="dddefault">Jan 07, 2019 - May 07, 2019</td>
<td CLASS="dddefault">Lecture</td>
<td CLASS="dddefault">Mayo Tiana (<ABBR title= "Primary">P</ABBR>)<a href="mailto:M-Tiana@neiu.edu" target="Mayo Tiana" ><img src="/wtlgifs/web_email.gif" align="middle" alt="E-mail" CLASS="headerImg" TITLE="E-mail" NAME="web_email" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=28 WIDTH=28 /></a></td>
</tr>
</table>
<br />
<a href="javascript:history.go(-1)" onMouseOver="window.status='Return to Previous'; return true" onFocus="window.status='Return to Previous'; return true" onMouseOut="window.status=''; return true"onBlur="window.status=''; return true">Return to Previous</a>
<!-- ** START OF twbkwbis.P_CloseDoc ** -->
<table CLASS="plaintable" SUMMARY="This is table displays line separator at end of the page."
WIDTH="100%" cellSpacing=0 cellPadding=0 border=0><tr><TD class="bgtabon" width="100%" colSpan=2><img src="/wtlgifs/web_transparent.gif" alt="Transparent Image" CLASS="headerImg" TITLE="Transparent Image" NAME="web_transparent" HSPACE=0 VSPACE=0 BORDER=0 HEIGHT=3 WIDTH=10 /></TD></tr></table>
<a href="#top" onMouseover="window.status='Skip to top of page'; return true" onMouseout="window.status=''; return true" OnFocus="window.status='Skip to top of page'; return true" onBlur="window.status=''; return true" class="skiplinks">Skip to top of page</a>
</DIV>
<div class="footerbeforediv">
</DIV>
<div class="footerlinksdiv">
<SPAN class="pagefooterlinks">
<map name="Student_Detail_Schedule_Links_F" title="Student Detail Schedule Links">
<p>
<a href="#skip_Student_Detail_Schedule_Links_F" onMouseover="window.status='Skip Student Detail Schedule Links'; return true" onMouseout="window.status=''; return true" onFocus="window.status='Skip Student Detail Schedule Links'; return true" onBlur="window.status=''; return true" class="skiplinks">Skip Student Detail Schedule Links</a>
<P>[ <a href="/neiuprod/bwskhreg.p_reg_hist" onMouseover="window.status='Show Registration History'; return true" onMouseout="window.status=''; return true" onFocus="window.status='Show Registration History'; return true" onBlur="window.status=''; return true" >Show Registration History</a>
| <a href="/neiuprod/bwskfreg.P_AltPin" onMouseover="window.status='Add or Drop Classes'; return true" onMouseout="window.status=''; return true" onFocus="window.status='Add or Drop Classes'; return true" onBlur="window.status=''; return true" >Add or Drop Classes</a>
| <a href="/neiuprod/bwskfcls.p_sel_crse_search" onMouseover="window.status='Look Up Classes'; return true" onMouseout="window.status=''; return true" onFocus="window.status='Look Up Classes'; return true" onBlur="window.status=''; return true" >Look Up Classes</a>
]
</map>
</SPAN>
<a name="skip_Student_Detail_Schedule_Links_F"></a>
</DIV>
<div class="footerafterdiv">
</DIV>
<div class="globalafterdiv">
</DIV>
<div class="globalfooterdiv">
</DIV>
<div class="pagefooterdiv">
<SPAN class="releasetext">Release: 8.7.1</SPAN>
</DIV>
<div class="poweredbydiv">
</DIV>
<DIV class="div1"></DIV>
<DIV class="div2"></DIV>
<DIV class="div3"></DIV>
<DIV class="div4"></DIV>
<DIV class="div5"></DIV>
<DIV class="div6"></DIV>
<div class="banner_copyright"> <br><h5>© 2019 Ellucian Company L.P. and its affiliates.<br></h5></div>
</body>
</html>

5
gcalendar.py

@ -0,0 +1,5 @@
import os
import sys
parent = os.path.dirname(__file__)
sys.path.insert(0,os.path.join(parent,'google_api_wrapper'))
from gapi.calendar_api import *

2
google_api_wrapper

@ -1 +1 @@
Subproject commit 78ee774585aa6c8993d24a9fdcc4604dc5522da9
Subproject commit de63a3871564e2b3f1faaa5f9c211e388358bc1f

3
requirements.txt

@ -0,0 +1,3 @@
pyppeteer
bs4
lxml

26
scraper.py

@ -19,10 +19,19 @@ def datetime2date_time(dtime,mode):
def seconds_from_midnight(t):
return t.hour*60**2+ t.minute*60+t.second
class Class:
def __init__(self,data):
def __init__(self,title,session,days,location,time_range):
self.title = title
self.session = session
self.days = days
self.location = location
self.time_range = time_range
self.lab = None
# data is a list of two html tables
def scrape(self,data):
info,times = data
# info
self.title,self.abrv,self.session = info.find('caption').text.split(' - ')
self.lab = None
self.session = int(self.session)
rows = info.find_all('tr')
for row in rows:
@ -49,9 +58,17 @@ class Class:
self.__dict__[name] = data
# time
headers,data = times.find_all('tr')
headers,*data = times.find_all('tr')
if len(data) > 1:
data,lab = data[:2]
else
lab = None
data = data[0]
data = (col.text for col in data.find_all('td'))
headers = (header.text.lower() for header in headers.find_all('th'))
def parse_horz_row(headers,row):
ret = {}
time_data = dict(zip(headers,data))
if time_data['time'] == 'TBA':
self.time_range = None
@ -69,18 +86,21 @@ class Class:
time_data['days'] = re.sub('[^{}]'.format(''.join(filter(bool,days))),'',time_data['days'])
self.days = list(days.index(time_data['days'][i]) for i in range(len(time_data['days'])))
self.location = time_data['where']
@property
def length(self):
return datetime.timedelta(seconds = sub(
seconds_from_midnight(self.time_range[1]),
seconds_from_midnight(self.time_range[0]),
))
def get_classes(page):
if not isinstance(page,BS):
page = BS(page,'lxml')
tables = page.find_all('table',attrs= {'class':'datadisplaytable'})
groups = ((tables[i],tables[i+1]) for i in range(0,len(tables),2))
return list(map(Class,groups))
return list(map(Class.scrape,groups))
if __name__ == "__main__":
with open('schedule.html') as file:

Loading…
Cancel
Save