美文网首页大数据 爬虫Python AI SqlPython编程
还在找枪版视频白嫖?别找了,我随手用python做的软件什么都能

还在找枪版视频白嫖?别找了,我随手用python做的软件什么都能

作者: 傻逼平台瞎几把封号 | 来源:发表于2022-01-17 15:02 被阅读0次

    如果你点进来了,必然不会后悔,没看的那些人才会后悔…

    这个功能只可意会不可言传

    看电影花银子是不可能的,有Python在直接搜索就能看!

    先看代码吧

    导入模块

    # 正则表达式  数据匹配
    import re
    import tkinter as tk
    # url地址解析
    from urllib import parse
    # 消息盒子
    import tkinter.messagebox as msgbox
    # 控制浏览器
    import webbrowser
    

    界面部分

    class App:
        # 重写构造函数 创建类属性的
        def __init__(self, width=500, height=300):
            # 创建自定义类属性
            self.w = width
            self.h = height
    
            # 软件名称
            self.title = '视频解析助手'
            # tk对象
            self.root = tk.Tk(className=self.title)
            # 变量去接收用户输入的电影地址 并且对地址做处理
    
            self.url = tk.StringVar()
            # 控制单选框默认选中的属性
            self.v = tk.IntVar()
            self.v.set(1)
    
            # 软件空间划分
            frame_1 = tk.Frame(self.root)
            frame_2 = tk.Frame(self.root)
    
            # 软件控件内容设置
            group = tk.Label(frame_1, text='播放通道:', padx=10, pady=10)
            tb = tk.Radiobutton(frame_1, text='唯一通道', variable=self.v, value=1, width=10, height=3)
    
            label = tk.Label(frame_2, text='请输入视频播放地址:')
            entry = tk.Entry(frame_2, textvariable=self.url, highlightcolor='Fuchsia', highlightthickness=1, width=30)
            play = tk.Button(frame_2, text='播放', font=('楷体', 12), fg='Purple', width=2, height=1, command=self.video_play)
    
            # 控件布局
            '''
            激活空间
            '''
            frame_1.pack()
            frame_2.pack()
            '''
            位置确定
            '''
            group.grid(row=0, column=0)
            tb.grid(row=0, column=1)
    
            '''
            空间2的控件位置无需看空间1的位置
            空间与空间之间是独立的
            '''
            label.grid(row=0, column=0)
            entry.grid(row=0, column=1)
            play.grid(row=0, column=2, ipadx=10, ipady=10)
    
        # 定义播放按钮的事件函数
    

    解析电影

    
        def video_play(self):
            # 第三方播放解析api
            port = 'http://www.wmxz.wang/video.php?url='
            # 判断用户输入的电影地址是否合法
            if re.match(r'https?:/{2}\w.+$', self.url.get()):
                ip = self.url.get()
                ip = parse.quote_plus(ip)
                # 自动打开浏览器
                webbrowser.open(port + ip)
            else:
                msgbox.showerror(title='错误', message='视频地址无效, 请重新输入...')
    
        # 如何启动软件
        def loop(self):
            self.root.mainloop()
    

    到这里还不知道具体是什么?我只能告诉你这是一个用来都说好的代码,运行成功了记得回来评论666

    就知道你没有评论,这部分代码不知道放哪了吧

    if __name__ == '__main__':
        app = App()
        app.loop()
    

    相关文章

      网友评论

        本文标题:还在找枪版视频白嫖?别找了,我随手用python做的软件什么都能

        本文链接:https://www.haomeiwen.com/subject/mrychrtx.html