利用Python也能觀看VIP視頻
大家好,我是IT共享者,人稱皮皮。
前面幾天給大家分享了兩篇關(guān)于文件下載的文章,可以幫助大家下載視頻,沒來得及看的小伙伴可以前往盤點(diǎn)4大下載神器,教你分分鐘搞定文件下載,安利一款神奇——教你輕松下載百度網(wǎng)盤超大文件,今天繼續(xù)給大家分享一篇實(shí)用的文章。
一、前言
在現(xiàn)在這個快節(jié)奏的社會,人們所面臨的壓力日漸增大,一般人們會利用聽歌看視頻來舒緩下緊張的情緒,眾所周知,很多視頻是需要收費(fèi),那么這個時候我們該怎樣才能越過這個限制,免費(fèi)看電影了。
相信大家對于VIP并不陌生,但是對著里面的技術(shù)還是頗有興趣的。下面我就來講解下最簡單的實(shí)現(xiàn)原理。
首先給大家看一下軟件的主界面,如圖:

二、實(shí)現(xiàn)步驟
下面給大家講解下實(shí)現(xiàn)步驟:
1、寫界面
- import tkinter as tk
- import tkinter.messagebox
- import webbrowser as wb
- class player:
- def __init__(self):
- self.root= tk.Tk() #初始化窗口
- self.root.title('VIP視頻破解軟件v1.0') #窗口名稱
- self.root.geometry("700x700") #設(shè)置窗口大小
- #設(shè)置窗口是否可變,寬不可變,高可變,默認(rèn)為True
- self.root.resizable(width=True,height=True)
- self.menu= tk.Menu(self.root)
- self.helpmenu = tk.Menu(self.menu, tearoff=0)
- self.helpmenu.add_command(label='幫助文檔', command=self.about)
- self.helpmenu.add_command(label='作者信息', command=self.zzxx)
- self.menu.add_cascade(label='幫助(H)', menu=self.helpmenu)
- self.root.config(menu=self.menu)
- self.val= tk.StringVar(value='')
- self.label1=tk.Label(self.root, text='視頻播放通道')
- self.label1.place(x=20,y=20,width=100,height=20)
- self.Radio=tk.IntVar(value=1)
- self.Radio1=tk.Radiobutton(self.root,variable=self.Radio,value=0,text='視頻通道1')
- self.Radio2 = tk.Radiobutton(self.root, variable=self.Radio, value=1, text='視頻通道2')
- self.Radio1.place(x=130,y=20,width=100,height=20)
- self.Radio2.place(x=250, y=20, width=100, height=20)
- self.val1=tk.StringVar(value='https://www.iqiyi.com/v_19rqpqcijk.html#vfrm=19-9-0-1')
- self.link= tk.Label(self.root, text='視頻播放鏈接')
- self.link.place(x=20, y=60, width=100, height=20)
- self.movie = tk.Entry(self.root, textvariable=self.val1)
- self.movie.place(x=130, y=60, width=300, height=20)
- self.clean=tk.Button(self.root,text='清空',command=self.qk)
- self.clean.place(x=440,y=60,width=30,height=20)
- self.warn= tk.Label(self.root, text='將視頻鏈接復(fù)制到框內(nèi),點(diǎn)擊播放VIP視頻')
- self.warn.place(x=50, y=90, width=400, height=20)
- self.val2=tk.StringVar
- self.start= tk.Button(self.root, text='播放VIP視頻', command=self.Button)
- self.start.place(x=220, y=140, width=80, height=30)
- self.start1 = tk.Button(self.root, text='愛奇藝', command=self.openaqy)
- self.start1.place(x=100, y=200, width=70, height=30)
- self.start2 = tk.Button(self.root, text='騰訊視頻', command=self.opentx)
- self.start2.place(x=200, y=200, width=80, height=30)
- self.start3 = tk.Button(self.root, text='優(yōu)酷視頻', command=self.openyq)
- self.start3.place(x=300, y=200, width=80, height=30)
- self.b1=tk.Button(self.root,text='技術(shù)博客,點(diǎn)我直達(dá)',command=self.refer)
- self.b1.place(x=200,y=600,width=140,height=40,anchor='nw')
- self.root.mainloop()
基本上沒什么 好說的,都比較簡單,我就挑重點(diǎn)說。
2、付費(fèi)視頻解析
打開愛奇藝或者其他的,只要是付費(fèi)會員才能看的視頻都可以,在這里我選這一部電影:

可以看出這是部付費(fèi)電影,身為白嫖怪的我們當(dāng)然受不了這個啦。
于是乎,受網(wǎng)絡(luò)的影響,我找到了視頻解析網(wǎng)站,哈哈哈。
- 1.http://17kyun.com/api.php?url=
- 2.https://api.kk06.top/?url=
這兩個網(wǎng)站親測可用,也不知道愛奇藝為啥對這個不管管,哈哈哈,咱也不敢問。不過溫馨提示下,視頻解析網(wǎng)站不一定是長期可以使用的,也許過一段時間就失效了,如果失效的話,大家也可以自行度娘找找看。
找到這兩個寶貝就好辦了,直接把付費(fèi)電影的鏈接放在解析網(wǎng)站地址的后面,然后就是這幅畫面:
我們就達(dá)到了目的,下面開始主程序的編寫。
3、編寫解析視頻函數(shù)
- def Button(self):
- a = 'http://17kyun.com/api.php?url=' if self.val1.get() else 'https://api.kk06.top/?url=' #Python騷操作:推倒式
- b = self.movie.get()
- wb.open(a+b) #打開瀏覽器進(jìn)行播放
4、編寫瀏覽各大主流網(wǎng)站的函數(shù)
- def openaqy(self):
- wb.open('http://www.iqiyi.com')
- def opentx(self):
- wb.open('http://v.qq.com')
- def openyq(self):
- wb.open('http://www.youku.com/')
5、菜單欄目
- def about(self):
- abc='''
- 經(jīng)過測試 ,支持站點(diǎn):
- 愛奇藝 騰訊 優(yōu)酷 土豆 芒果 樂視 搜狐 PPTV 華數(shù)TV 風(fēng)行 咪咕 嗶哩嗶哩 ACfun 暴風(fēng) CCTV CNTV
- 范特西 9i廣場舞 搜狐自媒體 M1905視頻 看看視頻 27盤 虎牙直播 全民直播 戰(zhàn)旗直播 人人視頻 爆米花
- 今日頭條 天翼視頻 糖豆視頻 龍珠視頻 快手視頻 一直播 新浪視頻 360小視頻 熊貓TV 斗魚TV 花椒直播
- 網(wǎng)易公開課 音悅臺 秒拍網(wǎng) 美拍網(wǎng) 愛拍 鳳凰視頻 梨視頻 微錄客 人民微視頻 17173視頻
- 優(yōu)米視頻 m3u8 mp4視頻 微博視頻 YY視頻 私有云資源
- '''
- tkinter.messagebox.showinfo(title='幫助文件', message=abc)
- def zzxx(self):
- msg='''
- 作者:皮皮
- 微信: pycharm1314
- 技術(shù)網(wǎng)站:http://pdcfighting.com/
- '''
- tkinter.messagebox.showinfo(title='聯(lián)系方式', message=msg)
6、啟動程序
啟動類player() 即可
三、總結(jié)
本程序雖然難度不大,但是勝在實(shí)用,我們用簡單的方法實(shí)現(xiàn)了相對復(fù)雜的技術(shù),哈哈哈哈!