1. 程式人生 > >幾行程式碼實現免費觀看VIP視訊

幾行程式碼實現免費觀看VIP視訊

一、簡單介紹

實現原理非常簡單。網上有很多vip視訊解析網站如 無名小站 等等,找到輸入vip視訊的介面。然後再加上一段vip視訊地址,最後把整個連結在預設瀏覽器開啟。

二、具體說明

1、尋找

開啟vip視訊解析網站如無名小站 ,可以看到直接的介面。我們要做的就是找到這個介面的連結。
這裡寫圖片描述

2、方式

輸入一個vip視訊連結如https://v.qq.com/x/cover/eiltk86r8o001mf.html(敦刻爾克)然後就可以看了。
這裡寫圖片描述
上圖畫圈便是先前看到的介面連結,然後加上“”敦刻爾克”視訊連結就可以播放了。

3、實現

我們要做就是程式設計實現介面與視訊連結的相加,最後在瀏覽器開啟。
我在網上找了很久,看了很多網頁原始碼終於找到五個介面連結供大家使用。

http://www.wmxz.wang/video.php?url=
http://www.a305.org/weixin.php?url=
http://www.vipjiexi.com/tong.php?url=
http://jx.aeidu.cn/index.php?url=
http://tv.dsqndh.com/?jk=http%3A%2F%2Fjqaaa.com%2Fjx.php%3Furl%3D&url=

4、用C#編寫整個程式

4.1、介面簡單設計

這裡寫圖片描述
五個通道代表上面的五個解析介面。

4.2、原始碼分解

string str1 = "http://www.wmxz.wang/video.php?url=";
//定義一個全域性變數用來存放解析介面

//這句程式碼用來實現用預設瀏覽器開啟連結
System.Diagnostics.Process.Start(str1 + textBox1.Text.ToString());

//下面是radiobutton改變監控事件,每次選擇一個通道便對str1賦予對應的介面
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
    str1 = "http://www.vipjiexi.com/tong.php?url=";
}

上面是核心的程式碼。

4.3 、全部原始碼

4.3.1、Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace wardseptember
{
    public partial class Form1 : Form
    {
        string str1 = "http://www.wmxz.wang/video.php?url=";

        public Form1()
        {
            InitializeComponent();
        }
        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            str1 = "http://www.wmxz.wang/video.php?url=";
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBox1.Text == "")
                {
                    MessageBox.Show("Please input correct video URL", "Warning Message", MessageBoxButtons.OKCancel);
                }
                else
                {
                    System.Diagnostics.Process.Start(str1 + textBox1.Text.ToString());
                }
            }
            catch
            {
                MessageBox.Show("Please check your input", "Warning Message", MessageBoxButtons.OKCancel);
            }
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            str1 = "http://www.vipjiexi.com/tong.php?url=";
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            str1 = "http://jx.aeidu.cn/index.php?url=";
        }

        private void radioButton5_CheckedChanged(object sender, EventArgs e)
        {
            str1 = "http://tv.dsqndh.com/?jk=http%3A%2F%2Fjqaaa.com%2Fjx.php%3Furl%3D&url=";
        }

        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            str1 = "http://www.a305.org/weixin.php?url=";
        }
    }
}

4.3.2 、Form1.Designer.cs

namespace wardseptember
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.radioButton1 = new System.Windows.Forms.RadioButton();
            this.radioButton2 = new System.Windows.Forms.RadioButton();
            this.radioButton3 = new System.Windows.Forms.RadioButton();
            this.radioButton4 = new System.Windows.Forms.RadioButton();
            this.radioButton5 = new System.Windows.Forms.RadioButton();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.button1 = new System.Windows.Forms.Button();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.groupBox1.SuspendLayout();
            this.SuspendLayout();
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.radioButton5);
            this.groupBox1.Controls.Add(this.radioButton4);
            this.groupBox1.Controls.Add(this.radioButton3);
            this.groupBox1.Controls.Add(this.radioButton2);
            this.groupBox1.Controls.Add(this.radioButton1);
            this.groupBox1.Location = new System.Drawing.Point(89, 33);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(269, 148);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "選擇播放通道";
            // 
            // radioButton1
            // 
            this.radioButton1.AutoSize = true;
            this.radioButton1.Checked = true;
            this.radioButton1.Location = new System.Drawing.Point(98, 28);
            this.radioButton1.Name = "radioButton1";
            this.radioButton1.Size = new System.Drawing.Size(59, 16);
            this.radioButton1.TabIndex = 0;
            this.radioButton1.TabStop = true;
            this.radioButton1.Text = "通道一";
            this.radioButton1.UseVisualStyleBackColor = true;
            this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
            // 
            // radioButton2
            // 
            this.radioButton2.AutoSize = true;
            this.radioButton2.Location = new System.Drawing.Point(98, 50);
            this.radioButton2.Name = "radioButton2";
            this.radioButton2.Size = new System.Drawing.Size(59, 16);
            this.radioButton2.TabIndex = 0;
            this.radioButton2.Text = "通道二";
            this.radioButton2.UseVisualStyleBackColor = true;
            this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
            // 
            // radioButton3
            // 
            this.radioButton3.AutoSize = true;
            this.radioButton3.Location = new System.Drawing.Point(98, 72);
            this.radioButton3.Name = "radioButton3";
            this.radioButton3.Size = new System.Drawing.Size(59, 16);
            this.radioButton3.TabIndex = 0;
            this.radioButton3.Text = "通道三";
            this.radioButton3.UseVisualStyleBackColor = true;
            this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
            // 
            // radioButton4
            // 
            this.radioButton4.AutoSize = true;
            this.radioButton4.Location = new System.Drawing.Point(98, 116);
            this.radioButton4.Name = "radioButton4";
            this.radioButton4.Size = new System.Drawing.Size(59, 16);
            this.radioButton4.TabIndex = 0;
            this.radioButton4.Text = "通道五";
            this.radioButton4.UseVisualStyleBackColor = true;
            this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton4_CheckedChanged);
            // 
            // radioButton5
            // 
            this.radioButton5.AutoSize = true;
            this.radioButton5.Location = new System.Drawing.Point(98, 94);
            this.radioButton5.Name = "radioButton5";
            this.radioButton5.Size = new System.Drawing.Size(59, 16);
            this.radioButton5.TabIndex = 0;
            this.radioButton5.Text = "通道四";
            this.radioButton5.UseVisualStyleBackColor = true;
            this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton5_CheckedChanged);
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(158, 212);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(200, 21);
            this.textBox1.TabIndex = 1;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(87, 215);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(65, 12);
            this.label1.TabIndex = 2;
            this.label1.Text = "視訊連結:";
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(205, 249);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(78, 35);
            this.button1.TabIndex = 3;
            this.button1.Text = "播放";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // textBox2
            // 
            this.textBox2.ForeColor = System.Drawing.Color.Red;
            this.textBox2.Location = new System.Drawing.Point(89, 290);
            this.textBox2.Multiline = true;
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new System.Drawing.Size(269, 64);
            this.textBox2.TabIndex = 4;
            this.textBox2.Text = "注意:此軟體僅用於學習交流,請勿用於任何商業用途。\r\n建議:建議將Chrome瀏覽器設定為預設瀏覽器。\r\nanthor:wardseptember";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(448, 374);
            this.Controls.Add(this.textBox2);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.groupBox1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "Form1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "VIP視訊解析助手";
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.RadioButton radioButton5;
        private System.Windows.Forms.RadioButton radioButton4;
        private System.Windows.Forms.RadioButton radioButton3;
        private System.Windows.Forms.RadioButton radioButton2;
        private System.Windows.Forms.RadioButton radioButton1;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.TextBox textBox2;
    }
}


4.4、打包C#程式詳細教程

5、python+pyqt5實現這個小程式

用python實現這個小程式是我今天剛寫的(2018.7.16),這次可以說是進行一些優化,vip視訊解析介面已經增加到了18個,幾乎全網的視訊都可以免費觀看。另外,這次是直接打包成可執行檔案,免安裝,方便使用。

5.1、原始碼

#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'WatchVIPVideo.ui'
# Created by: PyQt5 UI code generator 5.10.1
# @Time:2018/7/16 14:05
# @Author: wardseptember
# @File: VIPVideoWatch.py

from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import (QWidget, QLabel,QGridLayout,QLineEdit,QMainWindow,QMessageBox,
    QComboBox, QApplication)
from PyQt5.QtGui import QIcon,QColor
from PyQt5.QtCore import Qt
import sys
import webbrowser
class VIPVideo(QWidget):
    def __init__(self):
        super().__init__()

        self.setupUi(self)
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(447, 338)
        Form.setWindowIcon(QIcon('cat.ico'))
        self.comboBox_2 = QtWidgets.QComboBox(Form)
        self.comboBox_2.setGeometry(QtCore.QRect(200, 60, 171, 22))
        self.comboBox_2.setObjectName("comboBox_2")
        self.comboBox_2.addItem("Channel 1")
        self.comboBox_2.addItem("Channel 2")
        self.comboBox_2.addItem("Channel 3")
        self.comboBox_2.addItem("Channel 4")
        self.comboBox_2.addItem("Channel 5")
        self.comboBox_2.addItem("Channel 6")
        self.comboBox_2.addItem("Channel 7")
        self.comboBox_2.addItem("Channel 8")
        self.comboBox_2.addItem("Channel 9")
        self.comboBox_2.addItem("Channel 10")
        self.comboBox_2.addItem("Channel 11")
        self.comboBox_2.addItem("Channel 12")
        self.comboBox_2.addItem("Channel 13")
        self.comboBox_2.addItem("Channel 14")
        self.comboBox_2.addItem("Channel 15")
        self.comboBox_2.addItem("Channel 16")
        self.comboBox_2.addItem("Channel 17")
        self.comboBox_2.addItem("Channel 18")
        self.comboBox_2.setEditable(False)
        self.label_1 = QtWidgets.QLabel(Form)
        self.label_1.setGeometry(QtCore.QRect(70, 60, 121, 21))
        self.label_1.setObjectName("label_1")
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setGeometry(QtCore.QRect(70, 110, 121, 21))
        self.label_2.setObjectName("label_2")
        self.lineEdit = QtWidgets.QLineEdit(Form)
        self.lineEdit.setGeometry(QtCore.QRect(200, 110, 171, 20))
        self.lineEdit.setObjectName("lineEdit")
        self.textEdit = QtWidgets.QTextEdit(Form)
        self.textEdit.setGeometry(QtCore.QRect(70, 210, 301, 111))
        self.textEdit.setObjectName("textEdit")
        self.textEdit.setEnabled(False)


        self.pushButton = QtWidgets.QPushButton(Form)
        self.pushButton.setGeometry(QtCore.QRect(100, 160, 75, 23))
        self.pushButton.setObjectName("pushButton")
        self.pushButton.clicked.connect(self.OpenUrl)
        self.pushButton_2 = QtWidgets.QPushButton(Form)
        self.pushButton_2.setGeometry(QtCore.QRect(260, 160, 75, 23))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_2.clicked.connect(self.close)
        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
        Form.setFixedSize(Form.width(),Form.height())


        Form.show()
    def OpenUrl(self,Form):
        str=""
        str1=self.lineEdit.text()
        str2=self.comboBox_2.currentText()
        if str2=="Channel 1":
            str="http://www.wmxz.wang/video.php?url="
        elif str2=="Channel 2":
            str="http://goudidiao.com/?url="
        elif str2 == "Channel 3":
            str="http://api.baiyug.cn/vip/index.php?url="
        elif str2 == "Channel 4":
            str="http://www.a305.org/weixin.php?url="
        elif str2=="Channel 5":
            str="http://www.vipjiexi.com/tong.php?url="
        elif str2 == "Channel 6":
            str="http://jx.aeidu.cn/index.php?url="
        elif str2 == "Channel 7":
            str="http://www.sonimei.cn/?url="
        elif str2=="Channel 8":
            str="https://api.vparse.org/?url="
        elif str2 == "Channel 9":
            str="https://jx.maoyun.tv/index.php?id="
        elif str2 == "Channel 10":
            str="http://pupudy.com/play?make=url&id="
        elif str2=="Channel 11":
            str="http://www.qxyingyuan.vip/play?make=url&id="
        elif str2 == "Channel 12":
            str="http://appapi.svipv.kuuhui.com/svipjx/liulanqichajian/browserplugin/qhjx/qhjx.php?id="
        elif str2 == "Channel 13":
            str="http://api.xfsub.com/index.php?url="
        elif str2 == "Channel 14":
            str="https://jiexi.071811.cc/jx.php?url="
        elif str2 == "Channel 15":
            str="http://q.z.vip.totv.72du.com/?url="
        elif str2=="Channel 16":
            str="http://jx.api.163ren.com/vod.php?url="
        elif str2 == "Channel 17":
            str="http://www.sfsft.com/admin.php?url="
        elif str2 == "Channel 18":
            str="http://v.renrenfabu.com/jiexi.php?url="
        else:
            str="https://api.vparse.org/?url="
        if str1=="":
            reply = QMessageBox.question(self, 'Message',
                                         "Please correctly input url !",
                                         QMessageBox.Yes | QMessageBox.No,
                                         QMessageBox.Yes)
        else:
            webbrowser.open(str+str1)

    def retranslateUi(self, Form):
        _translate = QtCore.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "WatchVIPVideo"))
        self.label_1.setText(_translate("Form", "Select a channel:"))
        self.label_2.setText(_translate("Form", "Input VIPVideo URL:"))
        self.textEdit.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;color:red;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Note: This software is for learning technology only and should not be used for any commercial purposes.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Recommendation: It is recommended to set the Chrome browser as the default browser.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Author:wardseptember</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Author\'s email:[email protected]</p></body></html>"))
        self.pushButton.setText(_translate("Form", "Play"))
        self.pushButton_2.setText(_translate("Form", "Exit"))
if __name__ == '__main__':

    app = QApplication(sys.argv)
    ex = VIPVideo()
    sys.exit(app.exec_())


5.2、執行介面

這裡寫圖片描述

三、資源下載