from tkinter import * from tkhtmlview import HTMLLabel from api.ncnuMain import NcnuMainAPI def createNcnuMainWin(): win=Tk() win.title("暨大官網最新資訊!") win.geometry("600x600") textLb=Label(win,text="暨大校園最新資訊",font="Helvetica 20",bg="#ffcccc") sb=Scrollbar(win) htmlLable=HTMLLabel(win) htmlLable.configure(yscrollcommand=sb.set) textLb.pack(fill="x") sb.pack(side=RIGHT,fill="y") htmlLable.pack(fill="both",expand=True) win.update() #=====爬===== main = NcnuMainAPI() Link='''''' htmlLable.set_html(Link) win.mainloop()