-
Notifications
You must be signed in to change notification settings - Fork 0
/
activity.py
64 lines (46 loc) · 1.68 KB
/
activity.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
from apiclient.discovery import build
from bs4 import BeautifulSoup
from keys import developerKey
class Activity:
def __init__(self, fileId, developerKey,sequence=False, order=0):
#change this to oauth later? ask for developer key at init
self.drive_service = build('drive', 'v3', developerKey=developerKey)
html = self.get_html(fileId)
self.soup = BeautifulSoup(html, 'html.parser')
if sequence != False:
self.sequence = sequence
self.order = order #if there is no order number can I safely just add it to the beginning?
def get_html(self, fileId):
files = self.drive_service.files()
response = files.export(fileId=fileId,mimeType='text/html')
html = response.execute()
return html
def title(self):
title = "not parsing"
return title
def subject(self):
subject = "not parsing"
return subject
def concepts_practices(self):
concepts_practices = "not parsing"
return concepts_practices
def project_description(self):
project_description = "not parsing"
return project_description
def pacing(self):
pacing = "not parsing"
return pacing
def learning_targets(self):
return "not parsing"
def mini_lesson(self):
return "not parsing"
def independent_work(self):
return "not parsing"
def group_work(self):
return "not parsing"
def exit_slip(self):
return "not parsing"
def rubric_checklist(self):
return "not parsing"
activity = Activity("1J2n_XgsojFU2GuwHv8UUQvniKVO74r8fyke0RAU38jk", developerKey)
print activity.soup.prettify()