I am looking for work in Beijing, please contact me if you are interested: [email protected]
我正在寻找北京地区工作机会,有意请联系我:[email protected]
Golang短视频去水印:抖音,皮皮虾,火山,微视,最右,快手,全民小视频,皮皮搞笑,西瓜视频,虎牙,梨视频,acfun,好看视频...
License: MIT License
I am looking for work in Beijing, please contact me if you are interested: [email protected]
我正在寻找北京地区工作机会,有意请联系我:[email protected]
好看视频无法去水印
可以支持抖音图集嘛?
docker 搭建的
下载皮皮虾 解析提示成功点进去403
403 Forbidden
kngx/1.10.2
使用的docker,抖音下载的都是video.html
正常理解:video/id/parse?video_id=7346180570789039386&source=douyin,解析失败
实际传参:video/id/parse?video_id=douyin&source=7346180570789039386,解析成功
本来是docker部署,调试半天失败,把源码下载到本地打印下变量才发现这两个参数要反过来传才行
最后,感谢大佬开源
这个问题尝试 加个属性
rel="noreferrer"
<a class="mdui-btn mdui-btn-raised" rel="noreferrer" href="视频地址" target="_blank" download="video">下载视频
好看那个3分钟的能解除就牛了
➜ ~ curl 'http://127.0.0.1:8080/video/share/url/parse?url=https://www.kuaishou.com/f/X3z07vUZQYNv1L7' | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 45 100 45 0 0 36674 0 --:--:-- --:--:-- --:--:-- 45000
{
"code": 201,
"msg": "解析失败",
"data": null
}
抖音返回都是空的数据,拿不到数据哈
微视短视频,西瓜视频,最右,梨视频,快手
这几个平台老哥不能用呢
D:\Go\workspace>go run main.go
go: errors parsing go.mod:
D:\Go\workspace\go.mod:28:16510: unexpected newline in string
快手解析 空数据
返回视频的dns地址是根据什么规则来的呀,现在返回的域名经常变,导致小程序白名单设置跟不上。。。大佬有办法吗
抖音UID获取不正确
在拿到去水印视频链接后再判断下视频链接是否存在302重定向。
因为像抖音这种拿到的无水印链接是这样的。
# 后端返回去水印视频链接
https://aweme.snssdk.com/aweme/v1/play/?video_id=v0d00fg10000cc9lmmrc77u2negb5kq0&ratio=720p&line=0
# 请求上面的去水印视频链接会302重定向到下面的真正视频链接
location: https://v95-p.douyinvod.com/a21e1087c29eea568bb1768ca2951397/6316f605/video/tos/cn/tos-cn-ve-15c001-alinc2/5ad3c3f4c14144e79f23a481859e1b0c/?a=1128&ch=0&cr=0&dr=0&cd=0%7C0%7C0%7C0&cv=1&br=1444&bt=1444&cs=0&ds=3&ft=blh3-IQQqUuIf_oZmo0OW_EklpPixBGMpX6S9eF0GLfYr12&mime_type=video_mp4&qs=0&rc=ZTU5aWQ5NTVpaDU7Z2c2ZkBpM25laDU6ZnBvZjMzNGkzM0BfMjFiL2FhX18xNDEtY14uYSNuMmRrcjRvajZgLS1kLWFzcw%3D%3D&l=202209061425360102121680913C0460D5&btag=80000
后端在返回非302重定向的链接,当前端类似uniapp拿这个链接去请求时会请求不到视频资源,在uniapp中请求头还不能设置为Referer或者删除Referer请求头
,假如我是放在微信小程序访问的,Referer自动带的是微信的,这样就导致请求不到资源。
下面是我的判断解决方法:
// 在main.go文件第38行下面添加如下代码即可
//判断解析成功的视频链接是否还有重定向
client := resty.New()
client.SetRedirectPolicy(resty.NoRedirectPolicy())
res, _ := client.R().
SetHeader(parser.HttpHeaderUserAgent, parser.DefaultUserAgent).
Get(parseRes.VideoUrl)
locationRes, _ := res.RawResponse.Location()
if locationRes != nil {
parseRes.VideoUrl = locationRes.String()
}
需要换一种方式或者验证方式来处理了
rt
抖音的视频 是带着水印的
作者跑下看看
快手短视频
度小视(原全民)
好看视频
以下是我整理的一些各平台链接可用于测试
// got, err := s.Do("https://video.weibo.com/show?fid=1034:4866461475471394")
// got, err := s.Do("https://v.douyin.com/BDK77uk/")
// https://www.douyin.com/video/7191165445053943043?count=10&enter_method=post&modeFrom=userPost&previous_page=personal_homepage&secUid=MS4wLjABAAAA-wC5oUt7P7kQCceF-HNcysQflR9zzMiusyKMGuZqqHo
// got, err := s.Do("https://www.douyin.com/video/7191165445053943043")
// got, err := s.Do("https://www.acfun.cn/v/ac40611250")
// got, err := s.Do("https://h5.pipix.com/s/BfLeC6Y/")
// got, err := s.Do("https://share.huoshan.com/hotsoon/s/iERecGQrHz8/")
// got, err := s.Do("https://h5.pipigx.com/pp/post/710734416345")
// got, err := s.Do("https://v.kuaishou.com/HjrrVs")
// got, err := s.Do("https://isee.weishi.qq.com/ws/app-pages/share/index.html?wxplay=1&id=7jHdTeRJz1PoVO7c0&spid=4154077724590419836")
// got, err := s.Do("https://v.ixigua.com/BfNJD1L/")
// got, err := s.Do("https://share.xiaochuankeji.cn/hybrid/share/post?pid=307004856")
// got, err := s.Do("https://www.pearvideo.com/detail_1434599")
// got, err := s.Do("https://video.weibo.com/show?fid=1034:4866834743361585")
// got, err := s.Do("https://m.oasis.weibo.cn/v1/h5/share?sid=4863622893277226")
// got, err := s.Do("https://static-play.kg.qq.com/node/Z9Vi4bntD6/play_v2?s=I7ZjhyI-BFOA_I7y")
// got, err := s.Do("https://m.v.6.cn/v/7201784?vshare=100146746")
// got, err := s.Do("http://www.meipai.com/video/349/7014896128064769016")
// got, err := s.Do("https://www.xinpianchang.com/a12338172")
// got, err := s.Do("https://haokan.hao123.com/v?vid=11924885112745201174&pd=haokan_share&context=%7B%22cuid%22%3A%22_u2l8087Su_GuSaMg824u08MHu0Lav8RguvWi0OSHujhiSiK0OSfa_isSP0xfQO1F99mA%22%7D")
// got, err := s.Do("http://v.huya.com/m/play/fans/800779209.html")
// got, err := s.Do("http://v.huya.com/m/play/fans/800779209.html")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.