抖音C#版,自己抓第三方抖音网站

感谢http://dy.lujianqiang.com技术支持

文章更新:http://dy.lujianqiang.com这个服务器已经关了,现在没用了

 

版权归抖音公司所有,该博客只是为交流学习所使用,编译后的内容将24小时内删除

该程序所获取到的内容或视频归Beijing Microlive Vision Technology Co.Ltd公司所有

请浏览到该博客的人若已经编译成可执行文件,请将编译后的内容24小时内删除

若违反到法律,与本博客主Frank_dev无关

若侵犯到贵公司权益请联系我

 

邮箱:Frank_dev@qq.com

 

♥下面教如何实现这一功能

 

先打开vstudio 创建一个工程命名为Trill

namespace Trill
{
    partial class Main_Window
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows 窗体设计器生成的代码

        /// <summary>
        /// 设计器支持所需的方法 - 不要修改
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main_Window));
            this.video_player = new AxWMPLib.AxWindowsMediaPlayer();
            this.Refresh = new System.Windows.Forms.Timer(this.components);
            this.last = new System.Windows.Forms.Button();
            this.about = new System.Windows.Forms.Button();
            this.message = new System.Windows.Forms.GroupBox();
            this.icon = new System.Windows.Forms.PictureBox();
            this.ID = new System.Windows.Forms.Label();
            this.Message_Text = new System.Windows.Forms.Label();
            this.Group = new System.Windows.Forms.GroupBox();
            ((System.ComponentModel.ISupportInitialize)(this.video_player)).BeginInit();
            this.message.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.icon)).BeginInit();
            this.Group.SuspendLayout();
            this.SuspendLayout();
            // 
            // video_player
            // 
            this.video_player.Enabled = true;
            this.video_player.Location = new System.Drawing.Point(12, 12);
            this.video_player.Name = "video_player";
            this.video_player.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("video_player.OcxState")));
            this.video_player.Size = new System.Drawing.Size(232, 412);
            this.video_player.TabIndex = 4;
            // 
            // Refresh
            // 
            this.Refresh.Enabled = true;
            this.Refresh.Tick += new System.EventHandler(this.Refresh_Tick);
            // 
            // last
            // 
            this.last.Location = new System.Drawing.Point(260, 439);
            this.last.Name = "last";
            this.last.Size = new System.Drawing.Size(186, 30);
            this.last.TabIndex = 1;
            this.last.Text = "下一个Video";
            this.last.UseVisualStyleBackColor = true;
            this.last.Click += new System.EventHandler(this.last_Click);
            // 
            // about
            // 
            this.about.Location = new System.Drawing.Point(12, 439);
            this.about.Name = "about";
            this.about.Size = new System.Drawing.Size(100, 30);
            this.about.TabIndex = 2;
            this.about.Text = "关于";
            this.about.UseVisualStyleBackColor = true;
            this.about.Click += new System.EventHandler(this.about_Click);
            // 
            // message
            // 
            this.message.Controls.Add(this.icon);
            this.message.Controls.Add(this.ID);
            this.message.Location = new System.Drawing.Point(250, 12);
            this.message.Name = "message";
            this.message.Size = new System.Drawing.Size(220, 97);
            this.message.TabIndex = 6;
            this.message.TabStop = false;
            this.message.Text = "作品信息:";
            // 
            // icon
            // 
            this.icon.Location = new System.Drawing.Point(142, 20);
            this.icon.Name = "icon";
            this.icon.Size = new System.Drawing.Size(52, 52);
            this.icon.TabIndex = 1;
            this.icon.TabStop = false;
            // 
            // ID
            // 
            this.ID.AutoSize = true;
            this.ID.Location = new System.Drawing.Point(6, 39);
            this.ID.Name = "ID";
            this.ID.Size = new System.Drawing.Size(29, 12);
            this.ID.TabIndex = 0;
            this.ID.Text = "Data";
            // 
            // Message_Text
            // 
            this.Message_Text.AutoSize = true;
            this.Message_Text.Location = new System.Drawing.Point(8, 19);
            this.Message_Text.Name = "Message_Text";
            this.Message_Text.Size = new System.Drawing.Size(29, 12);
            this.Message_Text.TabIndex = 7;
            this.Message_Text.Text = "Text";
            // 
            // Group
            // 
            this.Group.Controls.Add(this.Message_Text);
            this.Group.Location = new System.Drawing.Point(250, 121);
            this.Group.Name = "Group";
            this.Group.Size = new System.Drawing.Size(220, 303);
            this.Group.TabIndex = 8;
            this.Group.TabStop = false;
            this.Group.Text = "评论";
            // 
            // Main_Window
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(482, 481);
            this.Controls.Add(this.Group);
            this.Controls.Add(this.message);
            this.Controls.Add(this.about);
            this.Controls.Add(this.video_player);
            this.Controls.Add(this.last);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.Name = "Main_Window";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Trill";
            this.Load += new System.EventHandler(this.Main_Window_Load);
            ((System.ComponentModel.ISupportInitialize)(this.video_player)).EndInit();
            this.message.ResumeLayout(false);
            this.message.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.icon)).EndInit();
            this.Group.ResumeLayout(false);
            this.Group.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion
        private AxWMPLib.AxWindowsMediaPlayer video_player;
        private System.Windows.Forms.Timer Refresh;
        private System.Windows.Forms.Button last;
        private System.Windows.Forms.Button about;
        private System.Windows.Forms.GroupBox message;
        private System.Windows.Forms.PictureBox icon;
        private System.Windows.Forms.Label ID;
        private System.Windows.Forms.Label Message_Text;
        private System.Windows.Forms.GroupBox Group;
    }
}

 

 

@然后是C#代码:

 

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Windows.Forms;

namespace Trill
{
    public partial class Main_Window : Form
    { 
        public Main_Window()
        {
            InitializeComponent();
        }

        
        private void Main_Window_Load(object sender, EventArgs e)
        {
            String video = "https://dy.lujianqiang.com/web";

            //MessageBox.Show(video);
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(video);
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            Stream ResStream = response.GetResponseStream();
            Encoding encoding = Encoding.GetEncoding("utf-8");
            StreamReader streamReader = new StreamReader(ResStream, encoding);
            var jObject = JObject.Parse(streamReader.ReadToEnd());

            var nickname = jObject["nickname"].ToString();
            nickname = nickname.Replace("\"", "");
            ID.Text = "作者ID:" + nickname;


            var icon_address = jObject["avatar"].ToString();
            icon_address = icon_address.Replace("\"", "");
            //icon_address = icon_address.Replace("/", "\\");
            //icon_address = icon_address.Replace("https", "http");
            //MessageBox.Show(icon_address);
            icon.Image = Image.FromStream(System.Net.WebRequest.Create(icon_address).GetResponse().GetResponseStream());


            var address = jObject["video"].ToString();
            address = address.Replace("\"", "");
            address = address.Replace("/", "\\");
            address = address.Replace("https", "http");
            video_player.URL = address;
            video_player.Ctlcontrols.play();




            var comments = jObject["comments"].ToString();
            comments = comments.Replace(",", "");
            comments = comments.Replace("\"", "");

            comments = comments.Replace("[", "");
            comments = comments.Replace("]", "");
            this.Message_Text.Text = comments;
            //MessageBox.Show(comments);
            
        }



        private void last_Click(object sender, EventArgs e)
        {
            String video = "https://dy.lujianqiang.com/web";//json in

            //MessageBox.Show(video);
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(video);
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            Stream ResStream = response.GetResponseStream();
            Encoding encoding = Encoding.GetEncoding("utf-8");
            StreamReader streamReader = new StreamReader(ResStream, encoding);
            var jObject = JObject.Parse(streamReader.ReadToEnd());

            var nickname = jObject["nickname"].ToString();
            nickname = nickname.Replace("\"", "");
            ID.Text = "作者ID:" + nickname;


            var icon_address = jObject["avatar"].ToString();
            icon_address = icon_address.Replace("\"", "");
            //icon_address = icon_address.Replace("/", "\\");
            //icon_address = icon_address.Replace("https", "http");
            //MessageBox.Show(icon_address);
            icon.Image = Image.FromStream(System.Net.WebRequest.Create(icon_address).GetResponse().GetResponseStream());


            var address = jObject["video"].ToString();//json如何使用
            address = address.Replace("\"", "");
            address = address.Replace("/", "\\");
            address = address.Replace("https", "http");
            video_player.URL = address;
            video_player.Ctlcontrols.play();




            var comments = jObject["comments"].ToString();
            comments = comments.Replace(",", "");
            comments = comments.Replace("[", "");
            comments = comments.Replace("]", "");
            comments = comments.Replace("\"", "");//转化符号

            this.Message_Text.Text = comments;

        }

        private void previous_Click(object sender, EventArgs e)
        {

        }
        private void about_Click(object sender, EventArgs e)
        {
            MessageBox.Show("这是一个抖音第三方客户端...:]","About");
        }

        private void Refresh_Tick(object sender, EventArgs e)
        {
            if (video_player.playState == WMPLib.WMPPlayState.wmppsStopped)
            {
                video_player.Ctlcontrols.play();
            }
        }

       
    }

 

 

 然后就完成啦,要完整源码的下方网站留言

 

 

 

 

------------------------------------转载请注明出处

 

转载于:https://www.cnblogs.com/Frank-dev-blog/p/9406826.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 抖音和快手是两个非常热门的短视频应用,随着网络技术的发展,人们对这些应用的使用体验要求也越来越高。而包XP模块是近期抖音快手最新引入的一个新功能,旨在提供更稳定、快速的用户体验。 包XP模块的主要功能是通过技术手段对应用程序中的数据包进行截取和分析。通过包,用户可以查看应用程序在与服务器进行通信时发送和接收的数据包,进而了解应用程序的工作原理和运行情况。 包功能在抖音快手最新本中加入XP模块,主要有以下几个优点: 1.稳定性提升:通过包XP模块,可以更有效地发现和解决应用程序中的各种bug和问题,提升应用的稳定性和可靠性。 2.速度优化:包XP模块可以对应用程序的通信过程进行优化,提高数据传输速度,使用户获取视频和上传视频的速度更快。 3.用户体验增强:包XP模块还可以根据用户的实际使用情况进行智能优化,提供个性化的服务和推荐,让用户更加满意和便利。 需要注意的是,包功能是一项高级技术,对于普通用户来说可能比较复杂和难以理解。因此,在正常使用抖音快手的过程中,用户不需要对包这一功能过多关注,只需要享受它带来的稳定、高效和便捷的短视频体验即可。 总之,抖音快手最新引入的包XP模块,通过技术手段提供更稳定、快速的用户体验,优化数据传输速度,提供个性化的服务和推荐,提高应用的稳定性和可靠性,从而带给用户更好的短视频体验。 ### 回答2: 抖音快手是目前最受欢迎的短视频分享平台,随着科技的发展和用户需求的增加,抖音快手不断推出新,以提供更好的使用体验。其中,包XP模块是其最新的一个重要功能。 包XP模块是指通过包技术,实现抖音快手APP内部数据的拦截和解析。它能够捕获抖音快手在用户手机与服务器之间传输的数据流,并进行分析和修改。使用包XP模块可以帮助用户实现一些高级操作,包括但不限于以下几个方面。 首先,包XP模块可以帮助用户了解抖音快手APP的数据传输过程。通过观察数据包的内容和传输路径,用户可以深入了解抖音快手APP的工作原理和数据交互模式。 其次,包XP模块可以助用户拦截和修改APP的数据流。用户可以利用这个功能进行一些个性化定制,例如修改视频分享的链接、屏蔽不想看的内容、强制开启高清视频等。 此外,包XP模块还可以用于数据分析和挖掘。用户可以通过包功能获取抖音快手APP内部的数据源,进而进行统计分析和挖掘,例如计算用户的活跃时段、关注领域,或者分析热门视频的传播路径等。 总的来说,包XP模块是抖音快手最新的一个重要功能,它帮助用户了解、定制和分析抖音快手APP的数据流。但需要注意的是,使用包功能可能涉及到隐私和法律问题,用户需在合法范围内使用,并遵守相关法律法规。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值