Skip to content

Commit

Permalink
extractors/youku: improve regex matching, close #229 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
iawia002 committed Aug 19, 2018
1 parent fae2ae9 commit 15b77b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extractors/youku.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ func genData(youkuData data) map[string]downloader.FormatData {

// Youku download function
func Youku(url string) downloader.VideoData {
vid := utils.MatchOneOf(url, `id_(.+?).html`)[1]
vid := utils.MatchOneOf(
url, `id_(.+?)\.html`, `id_(.+)`,
)[1]
youkuData := youkuUps(vid)
if youkuData.Data.Error.Code != 0 {
log.Fatal(youkuData.Data.Error.Note)
Expand Down

0 comments on commit 15b77b5

Please sign in to comment.