本帖最后由 dpc520 于 2022-10-25 22:36 编辑
皮皮虾无水印解析源码
微视无水印解析源码
皮皮搞笑无水印解析
抖音无水印解析源码
快手无水印解析源码
快手抖音都写出来了 给个免费的评分支持一下
直接调用简单粗暴
[C#] 纯文本查看 复制代码
Xg x = new Xg("https://www.ixigua.com/7136468208252355102?logTag=73864750a7ab63812068"); // Console.WriteLine(x.GetHeightMp4()); 得到视频质量最高的视频地址 // x.Get2160(); //得4k视频 如无返回空 // x.Get1080Mp4(); 得到1080分辨率视频 无返回空 "" // x.GetTitle 得到视频标题
这是封装好的类
[C#] 纯文本查看 复制代码
using HtmlAgilityPack;using Newtonsoft.Json.Linq;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.IO;using System.Net;using System.Text.RegularExpressions;using System.Net.Http;namespace Xg{ public class Xg { HtmlDocument Doc; //html JObject Json;//作品信息的JSON public Xg(string url) { if (url.Trim().Length == 29) GetHtml(ref url); //得到长链接 GetHtml(ref url); FormatJson( url); //构造函数 初始化json } public void GetHtml(ref string url) { HttpWebRequest Beg = (HttpWebRequest)WebRequest.Create(url) ; HttpWebResponse Ret; Beg.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"; Beg.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"; Beg.Headers.Add("Cookie", "ixigua-a-s=1; support_webp=true; support_avif=true; __ac_nonce=063454b6b00d4f78b8c1d; __ac_signature=_02B4Z6wo00f01f4IbSQAAIDCNrSkOsNVka3-KGmAABzJw2Jh8-UbwMpJADtyfKsBlG8uSNRlG8WRe0WJiBnnELkHGl2E80Qf.kjxNadHrUn3v1W-GR26riqXDqj.K.pu2jq57uPdJk8Z3oyK9c; _tea_utm_cache_1300=undefined; MONITOR_WEB_ID=7124914227890439694; ttwid=1%7CszSdFxHrf6xg5cThiKwJhsMNpw4Kpimnyepj1FIscYc%7C1665485824%7C1d015107dbdf704a70f6fc74722077d67f482d0b2d594a0652d360fe81baa93d; msToken=9JMXTpKWpn1A4K3t7lk7zDJXp1wxyaYuTlpCHyBvk1Z8o_TEQ7Sx-cOiniYgCyWBGGyghf97aS1kZncgNsE_mITorQuoHn8o4-vsNbmGF_m5ZSXtUvrUFalMzFqFs94EZA==; tt_scid=0csR7YE-y3ussN5mJn0gntW9jOIrdQODNrv1YmNbOgtAtRZNjp1xD8xrTC.Jn.Qa8e09"); if (url.Trim().Length == 29) { Beg.AllowAutoRedirect = false; Ret = (HttpWebResponse)Beg.GetResponse(); url = Ret.Headers["location"]; } else { Ret = (HttpWebResponse)Beg.GetResponse(); StreamReader Read = new StreamReader(Ret.GetResponseStream(), Encoding.UTF8); url = Read.ReadToEnd(); Read.Dispose(); } Ret.Dispose(); //得到html } public void FormatHtml(string str) { Doc = new HtmlDocument(); Doc.LoadHtml(str); //初始化html } public void FormatJson(string str) { Doc = new HtmlDocument(); Doc.LoadHtml(str); str = Doc.DocumentNode.SelectSingleNode("//body/script[@id='SSR_HYDRATED_DATA']").InnerText.Replace("window._SSR_HYDRATED_DATA=https://www.52pojie.cn/", "");>