import tkinter as tk
import webbrowser
# 定义接口列表
interfaces = [
"接口1|https://www.8090g.cn/?url=",
"接口2|https://www.ckplayer.vip/jiexi/?url=",
"接口3|https://jx.yangtu.top/?url=",
"接口4|https://jx.playerjy.com/?url=",
"接口5|https://www.pouyun.com/?url=",
"接口6(推荐)|https://jx.xmflv.com/?url=",
"接口7|https://43.240.74.102:4433/?url=",
"接口8|https://jx.xyflv.cc/?url=",
"接口9(推荐)|https://www.yemu.xyz/?url=",
"接口10|https://jx.m3u8.tv/jiexi/?url=",
"接口11|https://bd.jx.cn/?url=",
"接口12|https://www.playm3u8.cn/jiexi.php?url=",
"连续剧13|https://im1907.top/?jx=",
"接口14|https://jx.jsonplayer.com/player/?url=",
"接口15|https://jx.yangtu.top/?url=",
"接口16|https://vip.bljiex.com/?v=",
"接口17|https://bd.jx.cn/?url=",
"接口18|https://www.ckplayer.vip/jiexi/?url=",
"接口19|https://dmjx.m3u8.tv/?url=",
"接口20|https://yparse.ik9.cc/index.php?url=",
"接口21|https://jiexi.site/?url=",
"接口22|https://jx.playerjy.com/?url=",
"接口23|https://api.jiexi.la/?url=",
"接口24|https://jx.m3u8.tv/jiexi/?url=",
"接口25|https://www.playm3u8.cn/jiexi.php?url=",
"接口26|https://www.pangujiexi.cc/jiexi.php?url=",
"接口27|https://www.pangujiexi.com/jiexi/?url=",
"接口28|https://www.pouyun.com/?url=",
"接口29|https://jx.nnxv.cn/tv.php?url=",
"接口30|https://json.ovvo.pro/jx.php?url=",
"接口31|https://jx.dj6u.com/?url=",
"接口32|https://jx.ivito.cn/?url=",
"接口33|https://jx.xmflv.com/?url=",
"接口34|https://jx.xmflv.cc/?url=",
"接口35|https://www.yemu.xyz/?url=",
"接口36|https://jx.yparse.com/index.php?url=",
"接口37|https://www.1717yun.com/jx/ty.php?url=",
"接口38|https://jx.000380.top/jx/?url=",
"接口39|https://gj.fenxiangb.com/player/analysis.php?v="
]
def open_with_interface(interface):
url_to_open = text_box.get("1.0", tk.END).strip()
if url_to_open:
full_url = interface.split("|")[1] + url_to_open
webbrowser.open(full_url)
def try_all_interfaces():
url_to_open = text_box.get("1.0", tk.END).strip()
if url_to_open:
for interface in interfaces:
full_url = interface.split("|")[1] + url_to_open
try:
webbrowser.open(full_url)
return
except Exception:
continue
def create_gui():
global text_box
root = tk.Tk()
root.title("视频网站解析播放工具")
root.geometry("400x500") # 调整窗口宽度以适应5列
text_box = tk.Text(root, height=3, width=50)
text_box.grid(row=0, column=0, columnspan=5, pady=20)
# 按钮布局为5列
for row_num, interface in enumerate(interfaces):
col_num = row_num % 5 # 计算列数
row_index = row_num // 5 + 1 # 计算行数
button = tk.Button(root, text=interface.split("|")[0], command=lambda i=interface: open_with_interface(i))
button.grid(row=row_index, column=col_num)
auto_try_button = tk.Button(root, text='自动尝试所有接口', command=try_all_interfaces)
auto_try_button.grid(row=row_index + 1, column=0, columnspan=5)
clear_button = tk.Button(root, text="清空文本框", command=lambda: text_box.delete("1.0", tk.END))
clear_button.grid(row=row_index + 2, column=0, columnspan=5)
root.mainloop()
if __name__ == "__main__":
create_gui()