Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
assimon committed Nov 27, 2022
0 parents commit cc9aa2f
Show file tree
Hide file tree
Showing 29 changed files with 5,196 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea
config.toml
log/*
dist
.DS_Store
36 changes: 36 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
project_name: svbot
before:
hooks:
builds:
- env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
goarch:
- 386
- amd64
- arm
archives:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
files:
- config.toml.example
- README.md
- LICENSE
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 assimon/svbot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
76 changes: 76 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

## svbot

短视频直链解析机器人,支持:抖音/火山/快手/绿洲/皮皮虾/微博/微视/西瓜/最右|的短视频无水印解析

<p align="center">
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-blue" alt="license MIT"></a>
<a href="https://golang.org"><img src="https://img.shields.io/badge/Golang-1.17-red" alt="Go version 1.17"></a>
<a href="https://github.com/tucnak/telebot"><img src="https://img.shields.io/badge/Telebot Framework-v3-lightgrey" alt="telebot v3"></a>
<a href="https://github.com/assimon/svbot/releases"><img src="https://img.shields.io/badge/version-0.0.1-green" alt="version 0.0.1"></a>
</p>


## 项目初衷
如果你也讨厌在分享短视频的时候被平台加上牛皮癣式的水印或小尾巴(例如:`xx分享美好生活`)
那么,`svbot`将帮助你解决这些烦恼~

## 使用方式

### 一、自行编译
此安装方式多用于开发者,需电脑上安装`go语言`环境。
[go语言官网](https://golang.org/)

下载:
```shell
# 下载项目
git clone https://github.com/assimon/svbot && cd svbot
```
编译:
```shell
# 编译
go build -o svbot
# 给予执行权限
chmod +x ./svbot
```
配置:
```shell
cp .config.toml.example config.toml
```
执行:
```shell
# 调试启动
./svbot
# nohup
nohup ./svbot >> run.log 2>&1 &
```

### 二、下载已经编译好的二进制程序
此方式可以直接使用,用于服务器生产环境。
进入打包好的版本列表,下载程序:[https://github.com/assimon/svbot/releases](https://github.com/assimon/svbot/releases)
配置:
```shell
cp .config.toml.example config.toml
```
运行:
```shell
# linux
# 调试启动
./svbot

# windows
svbot.exe
```

## 配置
申请`Telegram bot api token` [https://t.me/BotFather](https://t.me/BotFather)
修改`config.toml`里面的`api_token`参数即可,无需其他配置。
例如:`api_token="xxxxxx"`

## 使用预览
### 1.复制短视频链接
<img src=/wiki/copy_url.gif width=500 height=1200 />

### 2.发送给机器人
<img src=/wiki/video.gif width=500 height=1200 />

11 changes: 11 additions & 0 deletions config.toml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[cookie]
kuaishou_cookie="did=web_5203607b4b9a47449cc67a14a95ad248; didv=1665371041000"
xigua_cookie="MONITOR_WEB_ID=7892c49b-296e-4499-8704-e47c1b150c18; ixigua-a-s=1; ttcid=af99669b6304453480454f150701d5c226; BD_REF=1; __ac_nonce=060d88ff000a75e8d17eb; __ac_signature=_02B4Z6wo00f01kX9ZpgAAIDAKIBBQUIPYT5F2WIAAPG2ad; ttwid=1%7CcIsVF_3vqSIk4XErhPB0H2VaTxT0tdsTMRbMjrJOPN8%7C1624806049%7C08ce7dd6f7d20506a41ba0a331ef96a6505d96731e6ad9f6c8c709f53f227ab1"

[log]
max_size=32
max_age=7
max_backups=3

[telegram]
api_token="your telegram bot api token"
36 changes: 36 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module github.com/assimon/svbot

go 1.17

require (
github.com/go-resty/resty/v2 v2.7.0
github.com/json-iterator/go v1.1.12
github.com/spf13/viper v1.13.0
go.uber.org/zap v1.17.0
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/telebot.v3 v3.1.2
)

require (
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit cc9aa2f

Please sign in to comment.