Code Monkey home page Code Monkey logo

parse-video's Introduction

Golang短视频去水印, 目前支持20个平台, 欢迎各位Star。

ps: 使用时, 请尽量使用app分享链接, 电脑网页版未做测试.

支持平台

平台 状态 平台 状态 平台 状态 平台 状态 平台 状态
皮皮虾 抖音短视频 火山短视频 皮皮搞笑 快手短视频
微视短视频 西瓜视频 最右 梨视频 度小视(原全民)
逗拍 微博 绿洲 全民K歌 6间房
美拍 新片场 好看视频 虎牙 AcFun

安装

// 根据分享链接解析
res, _ := parser.ParseVideoShareUrl("分享链接")
fmt.Printf("%#v", res)

// 根据视频id解析
res2, _ := parser.ParseVideoId(parser.SourceDouYin, "视频id")
fmt.Printf("%#v", res2)

Docker

获取 docker image

docker pull wujunwei928/parse-video

运行 docker 容器, 端口 8080

docker run -d -p 8080:8080 wujunwei928/parse-video

查看前端页面
访问: http://127.0.0.1:8080/

请求接口, 查看json返回

curl 'http://127.0.0.1:8080/video/share/url/parse?url=视频分享链接' | jq

返回格式

{
  "author": {
    "uid": "uid",
    "name": "name",
    "avatar": "https://xxx"
  },
  "title": "记录美好生活#峡谷天花板",
  "video_url": "https://xxx",
  "music_url": "https://yyy",
  "cover_url": "https://zzz"
}
字段名 说明
author.uid 视频作者id
author.name 视频作者名称
author.avatar 视频作者头像
title 视频标题
video_url 视频无水印链接
music_url 视频音乐链接
cover_url 视频封面

字段除了视频地址, 其他字段可能为空

依赖模块

模块 作用
github.com/gin-gonic/gin web框架
github.com/go-resty/resty/v2 HTTP 和 REST 客户端
github.com/tidwall/gjson 使用一行代码获取JSON的值
github.com/PuerkitoBio/goquery jQuery语法解析html页面
go get github.com/gin-gonic/gin
go get github.com/go-resty/resty/v2
go get github.com/tidwall/gjson
go get github.com/PuerkitoBio/goquery

parse-video's People

Contributors

wujunwei928 avatar sollyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.