用Python实现笔趣阁小说爬取,以后看小说都不用愁啦?
GUI使用经典的tkinter完成的
界面初始化
window = tk.Tk()
window.title('笔趣阁爬虫')
width = 300
height = 200
# 获取屏幕尺寸以计算布局参数,使窗口居屏幕中央
screenwidth = window.winfo_screenwidth()
screenheight = window.winfo_screenheight()
alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)
window.geometry(alignstr)
# 设置窗口是否可变长、宽,True:可变,False:不可变
window.resizable(width=False, height=True)
window.geometry('300x200')
# result = tk.StringVar()
# result.set("")
# main()
L1 = tk.Label(window, text='输入网址:')
L1.grid(row=0, column=0)
E1 = tk.Entry(window)
E1.grid(row=0, column=1)</