欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

2020-12-02

程序员文章站 2022-03-11 09:33:28
import tkinter as tkimport requestsimport webbrowserfrom tkinter import Buttonimport rewin=tk.Tk()win.title('百宝箱之视频解析')win['background'] = 'sky blue'win.geometry('1000x600+200+50')#主窗口url='http://www.9sey.cc/'resp=requests.get(url)resp.encod....

import tkinter as tk
import requests
import webbrowser
from tkinter import Button
import re

win=tk.Tk()
win.title('百宝箱之视频解析')
win['background'] = 'sky blue'
win.geometry('1000x600+200+50')

#主窗口
url='http://www.9sey.cc/'
resp=requests.get(url)
resp.encoding=resp.apparent_encoding
response=resp.text
res=re.compile('<option value="(.*?)" selected')
reg=re.findall(res,response)
jk1=reg[0]
jk2=reg[1]
jk3=reg[2]
jk4=reg[3]
jk5=reg[4]

url10 = 'https://www.ammmi.com/'#樱花动漫
url11='https://v.qq.com/'#腾讯视频
url12='http://app.iqiyi.com/pc/player/index.html'#爱奇艺
url13='https://www.mgtv.com/'#芒果tv
url14='https://www.youku.com/'#优酷
url15='https://www.bilibili.com/'#哔哩哔哩
url16='http://www.dongmanwang.com/'#动漫网
url17='https://tv.sohu.com/'#搜狐视频
url18='https://www.pptv.com/'#PPTV
url19='https://xiezuocat.com/#/'#论文减重网站
url20='https://www.cn-ki.net/'#仿知网
def Yinghua():
    webbrowser.open(url10)
    pass
def Tenxun():
    webbrowser.open(url11)
    pass
def Aiqiyi():
    webbrowser.open(url12)
    pass
def Manguo():
    webbrowser.open(url13)
    pass
def Youku():
    webbrowser.open(url14)
    pass
def Bilibili():
    webbrowser.open(url15)
    pass
def Donmang():
    webbrowser.open(url16)
    pass
def Souhu():
    webbrowser.open(url17)
    pass
def Pptv():
    webbrowser.open(url18)
    pass
def Mita():
    webbrowser.open(url19)
    pass
def Lunwen():
    webbrowser.open(url20)
    pass

def Vip1():
    webbrowser.open(var.get()+tt1.get())
    pass
#按键设置

l1=tk.Label(win,text='播放接口:',font=("Arial",12))
l1.grid()
var=tk.StringVar()

r1=tk.Radiobutton(win,text='解析接口1',variable=var,value=jk1)
r1.grid(row=0,column=1)
r2=tk.Radiobutton(win,text='解析接口2',variable=var,value=jk2)
r2.grid(row=1,column=1)
r1=tk.Radiobutton(win,text='解析接口3',variable=var,value=jk3)
r1.grid(row=2,column=1)
r2=tk.Radiobutton(win,text='解析接口4',variable=var,value=jk4)
r2.grid(row=3,column=1)
r1=tk.Radiobutton(win,text='解析接口5',variable=var,value=jk5)
r1.grid(row=4,column=1)

l2=tk.Label(win,text='播放链接:',font=("Arial",12))
l2.grid(row=8,column=0)
tt1=tk.Entry(w

本文地址:https://blog.csdn.net/weixin_51064701/article/details/110483321

相关标签: 笔记