本帖最后由 dpc520 于 2024-10-20 12:32 编辑
各大平台
抖音无水印解析
西瓜视频无水印解析
微视无水印解析
快手无水印解析
皮皮搞笑无水印解析
皮皮虾无水印解析
|
调用:
[C#] 纯文本查看 复制代码 Zy z = new Zy("#最右#分享一条有趣的内容给你,不好看算我输。请戳链接>>https://share.xiaochuankeji.cn/hybrid/share/post?pid=308675050&zy_to=applink&share_count=1&m=7a1c2aad0d2a1c780cfdadd10eea8670&d=3fef04e344a7881d409e28bbbe8b5ea998b1bba09753cb02dd0e203216c6d5095e1d1430e86eb664a619083966a1aba1&app=zuiyou&recommend=r0&name=n0&title_type=t0");
Console.WriteLine( z.GetMp4());
[C#] 纯文本查看 复制代码 using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace 最右
{
internal class Zy
{
JObject Json;
public Zy(string url)
{
GetMp4Id(ref url);
GetJson(url);
// Console.WriteLine(url);
}
public void GetMp4Id(ref string url)
{
url = url.Substring(url.IndexOf("pid=")+4,9);
//得到视频ID
}
public string GetJson(string mp4Id)
{
var Beg = WebRequest.Create("https://share.xiaochuankeji.cn/planck/share/post/detail");
Beg.Method= "POST";
var array =Encoding.UTF8.GetBytes("{\"pid\":"+mp4Id+"}");
Beg.ContentLength = array.Length;
var St = Beg.GetRequestStream();
St .Write(array, 0, array.Length);
var Ret = Beg.GetResponse();
var Read = new StreamReader( Ret.GetResponseStream() ,Encoding.UTF8);
var json = Read.ReadToEnd();
Json =JObject.Parse(json);
//解析JSON
St.Dispose();
Ret.Dispose();
Read.Dispose();
return json;
//得到JSON
}
public string GetAuthorName()
{
return Json["data"]["post"]["member"]["name"].ToString();
}//作者名
public string GetTitle()
{
return Json["data"]["post"]["content"].ToString();
}//视频标题
public string GetMp4()
{
string mp4Id = Json["data"]["post"]["imgs"][0]["id"].ToString(); ;
return Json["data"]["post"]["videos"][mp4Id]["url"] .ToString();
}//得到原视频
public string GetCover(string size)
{
string mp4Id = Json["data"]["post"]["imgs"][0]["id"].ToString(); ;
return $"http://tbfile.izuiyou.com/img/frame/id/{mp4Id}?w={size}&delogo=0";
}
// 240 360 540 3个分辨率可以选择、 , 买
}
}
|