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

时间:2022-10-13 21:56:46

感谢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(, );
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(, );
this.video_player.TabIndex = ;
//
// Refresh
//
this.Refresh.Enabled = true;
this.Refresh.Tick += new System.EventHandler(this.Refresh_Tick);
//
// last
//
this.last.Location = new System.Drawing.Point(, );
this.last.Name = "last";
this.last.Size = new System.Drawing.Size(, );
this.last.TabIndex = ;
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(, );
this.about.Name = "about";
this.about.Size = new System.Drawing.Size(, );
this.about.TabIndex = ;
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(, );
this.message.Name = "message";
this.message.Size = new System.Drawing.Size(, );
this.message.TabIndex = ;
this.message.TabStop = false;
this.message.Text = "作品信息:";
//
// icon
//
this.icon.Location = new System.Drawing.Point(, );
this.icon.Name = "icon";
this.icon.Size = new System.Drawing.Size(, );
this.icon.TabIndex = ;
this.icon.TabStop = false;
//
// ID
//
this.ID.AutoSize = true;
this.ID.Location = new System.Drawing.Point(, );
this.ID.Name = "ID";
this.ID.Size = new System.Drawing.Size(, );
this.ID.TabIndex = ;
this.ID.Text = "Data";
//
// Message_Text
//
this.Message_Text.AutoSize = true;
this.Message_Text.Location = new System.Drawing.Point(, );
this.Message_Text.Name = "Message_Text";
this.Message_Text.Size = new System.Drawing.Size(, );
this.Message_Text.TabIndex = ;
this.Message_Text.Text = "Text";
//
// Group
//
this.Group.Controls.Add(this.Message_Text);
this.Group.Location = new System.Drawing.Point(, );
this.Group.Name = "Group";
this.Group.Size = new System.Drawing.Size(, );
this.Group.TabIndex = ;
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(, );
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();
}
} }

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

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

抖音C#版,自己抓第三方抖音网站的更多相关文章

  1. 一篇文章教会你用Python抓取抖音app热点数据

    今天给大家分享一篇简单的安卓app数据分析及抓取方法.以抖音为例,我们想要抓取抖音的热点榜数据. 要知道,这个数据是没有网页版的,只能从手机端下手. 首先我们要安装charles抓包APP数据,它是一 ...

  2. 使用Flutter开发的抖音国际版

    简介 最近花了两天时间研究使用Flutter开发一个抖音国际版. 先上图,个人感觉使用Flutter开发app快得不要不要的额.  两天就基本可以开发个大概出来.   最主要是热更新,太方便实时调整U ...

  3. 第二篇-用Flutter手撸一个抖音国内版,看看有多炫

    前言 继上一篇使用Flutter开发的抖音国际版 后再次撸一个国内版抖音,大部分功能已完成,主要是Flutter开发APP速度很爽,  先看下图 项目主要结构介绍 这次主要的改动在api.dart 及 ...

  4. C&num;版的抓包软件

    C#版的抓包软件   [创建时间:2015-09-10 22:37:04] NetAnalyzer下载地址 不好意思啊,NetAnalyzer停更有点长了,今天继续填坑^&^ NetAnaly ...

  5. CODEVS——T1332 上白泽慧音 &vert;&vert; 洛谷——P1726 上白泽慧音

    http://codevs.cn/problem/1332/|| https://www.luogu.org/problem/show?pid=1726#sub  时间限制: 1 s  空间限制: 1 ...

  6. PHP根据抖音的分享链接来抓包抖音视频

    现在抖音是个很火的短视频平台,上面有许多不错的小视频.今天教大家怎么用PHP技术来获取到抖音上的的内容. 1:打开抖音选中你认为好的视频点击分享,复制链接,然后你会获取到如下的内容: #科比 愿你去的 ...

  7. 要你命3000会员版v20&period;03&lowbar;全球抖音模式

    要你命3000是搭配抖音和极其多软件的神器,支持国际版.国内版,可以去除全部限制,无需爬墙,无需拔卡,35个国家/*切换,真心强大,请务必低调,谢谢合作. 下载地址:https://sansuinb ...

  8. python&plus;fiddler 抓取抖音数据包并下载抖音视频

    这个我们要下载视频,那么肯定首先去找抖音视频的url地址,那么这个地址肯定在json格式的数据包中,所以我们就去专门查看json格式数据包 这个怎么找我就不用了,直接看结果吧 你找json包,可以选大 ...

  9. Fiddler抓取抖音视频

    目录 工具 Fiddler配置 手机端配置 工具 Android 或 ios手机均可 Fiddler 下载地址:https://www.telerik.com/fiddler Windows 操作系统 ...

随机推荐

  1. &lbrack;问题解决&rsqb;安装 SQL Server 无法开启NetFx3&period;5 的错误

    谷歌了一下,该问题是由于系统中缺少.Net3.5相关特性造成的.需要手动安装一下3.5的环境 解决办法: Windows 徽标键+R打开运行窗口 输入Dism /online /enable-feat ...

  2. DirectWrite文字排版——字符串去尾

    DirectWrite是 DirectX 家族中专门用来做文本处理的部分,主要配合Direct2D进行渲染工作. 一.字符串去尾介绍 在文字渲染中,不免会遇到字符串去尾的需求.字符串去尾指的是:当字符 ...

  3. 10、网页制作Dreamweaver(扩展:各浏览器对 onunload 事件的支持与触发条件实现有差异)

    标准参考 在 HTML 4.01 规范中关于 onunload 事件的描述是:当 document 从 window 中移除时,触发 onunload 事件. 关于 HTML 4.01 规范中 onu ...

  4. ocp 1Z0-051 1-22题解析

    1. View the Exhibit andexamine the structure of the SALES, CUSTOMERS, PRODUCTS, and TIMES tables. Th ...

  5. IOS 怎么修改Navigation Bar上的返回按钮文本颜色&comma;箭头颜色以及导航栏按钮的颜色

    self.navigationController.navigationBar.barTintColor = [UIColor blackColor]; self.navigationControll ...

  6. UIButton return(textField textView)

    首先设置TextField 或 TextView的 delegate /////UITextView - (BOOL)textView:(UITextView *)textView shouldCha ...

  7. OpenCV RGB2LAB执行效率测试

    代码 #include <iostream> #include <vector> #include <opencv2/opencv.hpp> #define ERR ...

  8. 封装LocalStorage&period;js

    之前使用vue开发的项目频繁使用到localStorage,封装了一下 localStorage.js文件代码如下: let obj = {}; /** * putLocalStorage 把数据放到 ...

  9. vue实战记录(五)- vue实现购物车功能之商品总金额计算和单选全选删除功能

    vue实战,一步步实现vue购物车功能的过程记录,课程与素材来自慕课网,自己搭建了express本地服务器来请求数据 作者:狐狸家的鱼 本文链接:vue实战-实现购物车功能(五) GitHub:sue ...

  10. Jenkins问题记录:android构建时提示Unzipping &sol;home&sol;&period;gradle&sol;wrapper&sol;dists&sol;gradle-3&period;3-all&sol;55gk2rcmfc6p2dg9u9ohc3hw9&sol;gradle-3&period;3-all&period;zip to &sol;home&sol;&period;gradle&sol;wrapper&sol;dists&sol;gradle-3&period;3-all&sol;55gk2rcmfc6p2dg9u9ohc3hw9 Except

    -------------- -------------- 问题:今日job构建报出如下错误: Unzipping /home/.gradle/wrapper/dists/gradle-3.3-all ...