So I am nearly finished with my maturapaper. I am getting close to deadline (2 months) and wanted to add a "widget" which displays the timetable/classroomtable. I was able to web scrape all the informations I need out of the timetablewebsite and now I need to display them in the smartmirror.py file.
My main question is:
Is there a possibility in outputting html in the smartmirror.py file? (the data is already webscraped)
How can I do that? If not, how would I be able to make suchs a widget?
Best regards
Marco Leder
Attachement:
My Code (changed the link so it doesn't work)
import urllib2from bs4 import BeautifulSoup
ken = "https://ntr.k.ch/stuan/lasstgslan/"page = urllib2.urlopen(ken)
Hello guys
So I am nearly finished with my maturapaper. I am getting close to deadline (2 months) and wanted to add a "widget" which displays the timetable/classroomtable. I was able to web scrape all the informations I need out of the timetablewebsite and now I need to display them in the smartmirror.py file.
My main question is:
Is there a possibility in outputting html in the smartmirror.py file? (the data is already webscraped) How can I do that? If not, how would I be able to make suchs a widget?
Best regards Marco Leder
Attachement:
My Code (changed the link so it doesn't work)
import urllib2
from bs4 import BeautifulSoup
ken = "https://ntr.k.ch/stuan/lasstgslan/"
page = urllib2.urlopen(ken)
soup = BeautifulSoup(page, "html5lib")
tableVar = soup.find('table',attrs={'class': 'full'})
w4bdiv = tableVar.find("div", string="W4b")
classTr = w4bdiv.find_parent("tr")
print classTr