6
6
from oauth2client import client
7
7
from oauth2client import tools
8
8
from oauth2client import file
9
+ from remote import registrationRepository
9
10
10
11
import os , httplib2
11
12
from datetime import datetime , timedelta
@@ -81,7 +82,6 @@ def get_credentials():
81
82
print ('Storing credentials to ' + credential_path )
82
83
return credentials
83
84
84
-
85
85
def createCalendar (service ):
86
86
"""
87
87
Creates a calendar on Google Calendar.
@@ -96,8 +96,6 @@ def createCalendar(service):
96
96
calendarId = creationResult .get ("id" )
97
97
return calendarId
98
98
99
-
100
-
101
99
def fillCalendar (cId , service , rows ):
102
100
103
101
for i in xrange (1 , len (rows )):
@@ -127,12 +125,17 @@ def fillCalendar(cId, service, rows):
127
125
}
128
126
service .events ().insert (calendarId = cId , body = eventDetails ).execute ()
129
127
print "Entry processed : " + entry ["name" ]
130
-
131
128
132
- regFile = open ("registrationPage.htm" , "r" )
133
- regPage = regFile .read ()
129
+ user_id = raw_input ("Enter your student id : " )
130
+ password = raw_input ("Enter your password : " )
131
+
132
+ registration_repo = registrationRepository .RegistrationRepository (user_id , password )
133
+ reg_page = registration_repo .get_reg_page ()
134
+
135
+ #regFile = open("registrationPage.htm", "r")
136
+ #regPage = regFile.read()
134
137
135
- soup = BeautifulSoup (regPage , "html.parser" )
138
+ soup = BeautifulSoup (reg_page , "html.parser" )
136
139
137
140
tables = soup .find_all ("table" )
138
141
0 commit comments