Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
Update douyin.go
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerLiNing committed Jul 11, 2020
1 parent 50b20ae commit 5e4ea1d
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions douyin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,42 @@ package douyin

import "log"

func WatermarkRemover(url string) (string, error) {
func WatermarkRemover(url string) (string, error) {
id, err := getVideoId(url)
if err != nil {
log.Fatal(err)
return "", err
}

if len(id) == 0 {
return "", nil
}

videoLink, err := getVideoLink(id)

if err != nil {
log.Fatal(err)
return "", err
}

if len(videoLink) == 0 {
return "", nil
}



finalLink, err := getFinalVideoLink(videoLink)

if err != nil {
log.Fatal(err)
return "", err
}

if len(finalLink) == 0 {
return "", nil
}



return finalLink, nil
}

0 comments on commit 5e4ea1d

Please sign in to comment.