抖音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(, );
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#版,自己抓第三方抖音网站的更多相关文章
- 一篇文章教会你用Python抓取抖音app热点数据
今天给大家分享一篇简单的安卓app数据分析及抓取方法.以抖音为例,我们想要抓取抖音的热点榜数据. 要知道,这个数据是没有网页版的,只能从手机端下手. 首先我们要安装charles抓包APP数据,它是一 ...
- 使用Flutter开发的抖音国际版
简介 最近花了两天时间研究使用Flutter开发一个抖音国际版. 先上图,个人感觉使用Flutter开发app快得不要不要的额. 两天就基本可以开发个大概出来. 最主要是热更新,太方便实时调整U ...
- 第二篇-用Flutter手撸一个抖音国内版,看看有多炫
前言 继上一篇使用Flutter开发的抖音国际版 后再次撸一个国内版抖音,大部分功能已完成,主要是Flutter开发APP速度很爽, 先看下图 项目主要结构介绍 这次主要的改动在api.dart 及 ...
- C#版的抓包软件
C#版的抓包软件 [创建时间:2015-09-10 22:37:04] NetAnalyzer下载地址 不好意思啊,NetAnalyzer停更有点长了,今天继续填坑^&^ NetAnaly ...
- CODEVS——T1332 上白泽慧音 || 洛谷——P1726 上白泽慧音
http://codevs.cn/problem/1332/|| https://www.luogu.org/problem/show?pid=1726#sub 时间限制: 1 s 空间限制: 1 ...
- PHP根据抖音的分享链接来抓包抖音视频
现在抖音是个很火的短视频平台,上面有许多不错的小视频.今天教大家怎么用PHP技术来获取到抖音上的的内容. 1:打开抖音选中你认为好的视频点击分享,复制链接,然后你会获取到如下的内容: #科比 愿你去的 ...
- 要你命3000会员版v20.03_全球抖音模式
要你命3000是搭配抖音和极其多软件的神器,支持国际版.国内版,可以去除全部限制,无需爬墙,无需拔卡,35个国家/自由切换,真心强大,请务必低调,谢谢合作. 下载地址:https://sansuinb ...
- python+fiddler 抓取抖音数据包并下载抖音视频
这个我们要下载视频,那么肯定首先去找抖音视频的url地址,那么这个地址肯定在json格式的数据包中,所以我们就去专门查看json格式数据包 这个怎么找我就不用了,直接看结果吧 你找json包,可以选大 ...
- Fiddler抓取抖音视频
目录 工具 Fiddler配置 手机端配置 工具 Android 或 ios手机均可 Fiddler 下载地址:https://www.telerik.com/fiddler Windows 操作系统 ...
随机推荐
- UML-6.3-用例-详述示例
用例标示:摘要(主成功场景).非正式(几乎所有场景).详述. 下边主要说下详述.其模板: 例子: 用例UC1:处理销售 范围 NextGen POS应用 级别 用户目标 主要参与者 收银员 涉众及关注 ...
- C++下遍历文件夹
编写程序遍历文件夹及其子文件夹下所有文件,并输出到标准输出流或者文件流. 1. 先考虑在单层目录下,遍历所有文件.以C:\WINDOWS为例: 用到数据结构_finddata_t,文件信息结构体的指针 ...
- python+Selenium之操作滚动条
当我们做测试的时候,如果页面过长,就会定位元素失败,这时可以使用move_to_element方法跳到该元素的位置再操作: from selenium.webdriver.common.action_ ...
- (转)Linux企业运维人员常用的150个命令分享
Linux企业运维人员常用的150个命令分享 原文:http://www.jb51.net/article/127014.htm 本文将向大家介绍Linux企业运维人员常用的150个命令,如有不足之处 ...
- Ubuntu下的RabbitMQ安装与web管理配置
首先在Ubutnu的/etc/apt/sources.list文件中加入一行 deb http://cz.archive.ubuntu.com/ubuntu trusty main 然后执行 sudo ...
- 基础selenium+Python(定位、等待、打印)
1.第一个脚本 # coding = utf-8 from selenium import webdriver browser = webdriver.Firefox() browser.get(&q ...
- selenium+junit4实现参数化自动化测试
业务场景:在www.1905.com电影网中实现两个用户的登陆操作. 代码如下: package com.m1905.junit; import java.util.Arrays; import ja ...
- Spark on YARN简介与运行wordcount(master、slave1和slave2)(博主推荐)
前期博客 Spark on YARN模式的安装(spark-1.6.1-bin-hadoop2.6.tgz +hadoop-2.6.0.tar.gz)(master.slave1和slave2)(博主 ...
- C 六度空间理论的实现
“六度空间”理论又称作“六度分隔(Six Degrees of Separation)”理论.这个理论可以通俗地阐述为:“你和任何一个陌生人之间所间隔的人不会超过六个,也就是说,最多通过五个人你就能够 ...
- 【ExtJS】关于Component生命周期
很久以前就学习过extjs的组件生命周期,很久之后,再回头看一看,又增加好多新的认识. extjs组件生命周期大体分为3个阶段:初始化.渲染.销毁. 第一阶段:初始化 初始化工作开始于组件的诞生,所有 ...