parent
771692052c
commit
e5e2e117ea
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,30 @@
|
|||||||
|
from tkinter import Tk, Label, Entry, Button, StringVar, messagebox
|
||||||
|
import 抖音
|
||||||
|
|
||||||
|
def start_fetch():
|
||||||
|
url = url_var.get()
|
||||||
|
cookie = cookie_var.get()
|
||||||
|
if url and cookie:
|
||||||
|
# 调用 douyin.py 中的函数,并传递 URL 和 Cookie
|
||||||
|
抖音.chuancan(url, cookie)
|
||||||
|
else:
|
||||||
|
messagebox.showwarning("警告", "请输入URL和Cookie")
|
||||||
|
|
||||||
|
# 创建 GUI
|
||||||
|
root = Tk()
|
||||||
|
root.title("抖音评论抓取")
|
||||||
|
|
||||||
|
# URL 标签和输入框
|
||||||
|
Label(root, text="URL:").grid(row=0, column=0, padx=10, pady=10)
|
||||||
|
url_var = StringVar()
|
||||||
|
Entry(root, textvariable=url_var, width=50).grid(row=0, column=1, padx=10, pady=10)
|
||||||
|
|
||||||
|
# Cookie 标签和输入框
|
||||||
|
Label(root, text="Cookie:").grid(row=1, column=0, padx=10, pady=10)
|
||||||
|
cookie_var = StringVar()
|
||||||
|
Entry(root, textvariable=cookie_var, width=50).grid(row=1, column=1, padx=10, pady=10)
|
||||||
|
|
||||||
|
# 提交按钮
|
||||||
|
Button(root, text="开始抓取", command=start_fetch).grid(row=2, columnspan=2, pady=10)
|
||||||
|
|
||||||
|
root.mainloop()
|
Loading…
Reference in new issue