抖音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);}#endregionprivate 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

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/397294.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/397294.shtml
英文地址,請注明出處:http://en.pswp.cn/news/397294.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

linux命令-vim命令模式

編輯模式下 按 “esc” 進去命令模式 &#xff1a;wq 保存并退出 &#xff1a;w 保存 已寫入 &#xff1a;q&#xff01;不保存強制退出 &#xff1a;wq&#xff01; 強制保存退出 &#xff1a;set nu 顯示行號 &#xff1a;set nonu 去掉行號 &#xff1a;nohl 取消高亮 /字…

ai在計算機教學中的應用,淺談人工智能在教育中的應用

淺談人工智能在教育中的應用孫立友摘要&#xff1a;隨著人工智能技術的進步&#xff0c;以及研究的深入和在教育領域的逐步推廣&#xff0c;對教育領域產生了深遠的影響。人工智能對于彌補當前教育存在的種種缺陷和不足&#xff0c;推動教育發展改革和教學現代化進程起著越來越…

TCP 和 UDP

TCP/IP五層網絡結構模型 物理層&#xff1a;物理層建立在物理通信介質的基礎上&#xff0c;作為系統和通信介質的接口&#xff0c;用來實現數據鏈路實體間透明的比特 (bit) 流傳輸。只有該層為真實物理通信&#xff0c;其它各層為虛擬通信 數據鏈路層:在物理層提供比特流服務的…

sapmto生產模式配置及操作詳解_硬巖制砂線怎么設計?300t/h的生產流程與設備配置詳解...

點擊上方“藍字”關注我們說到硬巖&#xff0c;花崗巖、輝綠巖都不陌生&#xff0c;關于花崗巖的生產線配置小編曾介紹過&#xff0c;感興趣的可直接點閱&#xff1a;《硬質巖破碎很發愁&#xff1f;從原料到成品&#xff0c;看花崗巖的破碎制砂生產線配置》《年產300萬t花崗巖…

公交卡軟件測試思路,中國移動NFC專用SIM卡測試過程介紹

近期&#xff0c;通訊運營商在NFC的應用領域邁出了一大步&#xff0c;消費者在北京乘坐地鐵、公交以及其他支持市政一卡通消費的場所均可進行手機支付。接下來就從辦卡開始&#xff0c;為大家詳細介紹一下中國移動NFC手機錢包的實測過程。辦理手機NFC支付業務想要刷手機消費除了…

Java 集合系列目錄(Category)

Java 集合系列目錄(Category) 轉自&#xff1a;Java 集合系列目錄(Category) 01. Java 集合系列01之 總體框架 02. Java 集合系列02之 Collection架構 03. Java 集合系列03之 ArrayList詳細介紹(源碼解析)和使用示例 04. Java 集合系列04之 fail-fast總結(通過ArrayList來說明f…

spring的applicationContext.xml如何自動加載

一個web工程自動加載的配置文件只有web.xml&#xff0c;想要加載其他.xml必須在web.xml里面進行配置。 用spring的時候需要一個bean容器來管理所有的bean&#xff0c;所有bean默認是寫在applicationContext.xml里的&#xff0c;在web.xml里面是這么設置的&#xff0c; 1 <co…

青年教師大講堂 計算機,浙海大青年教師大講堂之船機學院“知識改變命運”...

原標題&#xff1a;浙海大青年教師大講堂之船機學院“知識改變命運”10月28日上午&#xff0c;由校團委主辦&#xff0c;船舶與機電工程學院團委承辦的青年博士教師大講堂系列活動之“知識改變命運”在長峙校區楊存國一號報告廳舉行。本次講座由船舶與機電工程學院青年博士石學…

ndwi是什么意思_NDWI是什么意思

1. Thus, this indicates that NDWI is a useful vegetation index for estimating forest fire potential in the Atlantic region.因此&#xff0c;這表明NDWI是在大西洋地區的潛在有用的森林火災指數。2. NDWI的翻譯2. Therefore, the NDWI is not suitable for enhancing a…

深入淺出分布式文件系統MogileFS集群

一&#xff0c;簡介 MogileFS是一款開源的分布式文件存儲系統&#xff0c;由LiveJournal旗下的Danga Interactive公司開發。Danga團隊開發了包括 Memcached、MogileFS、Perlbal 等多個知名的開源項目。目前MogileFS的日益成熟使用此解決方法的公司越來越多&#xff0c;例如日…

python并行計算numpy_【Nature文章摘錄】NumPy: 從單機到分布式并行計算

原標題&#xff1a;【Nature文章摘錄】NumPy: 從單機到分布式并行計算點擊上圖&#xff0c;查看詳情本公眾號的推送以互聯網大數據技術為主&#xff0c;是《互聯網大數據處理技術與應用》《Python爬蟲大數據采集與挖掘》等課程的配套號。內容涉及 大數據采集、存儲、分析挖掘的…

Aho-Corasick automaton 模板

typedef struct Node* node;const int MAXNs ;//模式串最大長度 const int MAXNS ;//文章&#xff08;待匹配串&#xff09;最大長度 struct Node{node next[26];node fail;//失配指針int sum;Node(){sum 0;fail NULL;memset(next,NULL,sizeof next);} };char s[MAXNs];//…

Ubuntu Server 14.04 下root無法ssh登陸

今天安裝了Ubuntu Server 14.04 在終端配置了root密碼后&#xff0c;使用SecureCRT和putty竟然不能ssh登陸&#xff0c;SecureCRT一直提示密碼不對&#xff0c;但是可以肯定輸入的密碼100%正確&#xff0c;用putty則一直報Access Denied&#xff0c;所以可以肯定系統限制了ro…

計算機的控制面板打不開,控制面板打不開,教您控制面板打不開怎么辦

最近有些不少的小伙伴向小編反映說&#xff0c;控制面板突然出現了打不開的情況&#xff0c;那么遇到這種情況該怎么辦呢&#xff1f;其實控制面板打不開很有可能是因為系統文件損壞造成的。今天&#xff0c;小編就來把打不開控制面板的解決方法分享給你們。其實控制面板是我們…

【算法題】Multiples of 3 and 5

Multiples of 3 and 5 原題 題意如下&#xff1a; 找出N以內的3和5的倍數的和。 思路 1、剛看到覺得好弱智&#xff0c;直接遍歷一遍不就OK了嗎&#xff1f;但是第2和第3個測試用例報了TLE&#xff0c;超時。 2、然后想不出來了&#xff0c;搜了一下&#xff0c;發現有一個類似…

PIL簡單圖片處理(上)

自己看了下python&#xff0c;本來想照教程上一點一點學的&#xff0c;學了一會發現好沒勁&#xff08;教程本身質量很好&#xff09;&#xff0c;學python就是為了好玩&#xff0c;為什么還這么按部就班勒&#xff1f;果斷google下python的爬蟲&#xff08;開始目的是這個&…

方舟服務器制作修改,ARK方舟:生存進化服務器禁止物品制造的修改方法

ARK方舟:生存進化服務器禁止物品制造的修改方法代碼對應的文件目錄:文件:Game.ini框架:[/script/shootergame.shootergamemode]例如禁用C4遙控器代碼為:ConfigOverrideItemCraftingCosts(ItemClassString"PrimalItem_WeaponC4_C",BaseCraftingResourceRequirements((…

Java中ArrayList的使用

ArrayList類是一個特殊的數組--動態數組。來自于System.Collections命名空間&#xff1b;通過添加和刪除元素&#xff0c;就可以動態改變數組的長度。 優點&#xff1a; 1、支持自動改變大小 2、可以靈活的插入元素 3、可以靈活的刪除元素 局限&#xff1a; 比一般的數組的速度…

mallco動態分配_malloc動態分配的內存的生存周期是多少?

曾經有一個朋友提過這樣一個問題&#xff0c;malloc動態分配的內存的生存周期是多少當時直接回答&#xff0c;當然是在調用free進行釋放之前阿!!但回頭我仔細想過這個問題&#xff0c;在free調用之前那段范圍內&#xff0c;但free只有一個指針參數&#xff0c;它是如何知道要釋…

中興中心管理服務器fxh3120,中興多媒體業務中心ZXMS80

運營支撐層&#xff1a; 提供面向視訊用戶的客服中心和面向管理員的業務中心、網管中心。客服中心提供會議預約、會議控制、帳單查詢、意見反饋等功能。業務中心分為業務受理中心、業務管理中心、認證計費中心。其中業務受理中心實現開戶、放號及收費等功能&#xff1b;業務管理…