Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #59 from SogoCZE/master
Browse files Browse the repository at this point in the history
Fix of regex in parsing embedded videos
  • Loading branch information
rylio committed Dec 17, 2018
2 parents 0227c2b + 1d9be37 commit 44fe64b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion video_info.go
Expand Up @@ -187,7 +187,7 @@ func getVideoInfoFromHTML(id string, html []byte) (*VideoInfo, error) {
return nil, err
}
// re = regexp.MustCompile("\"sts\"\\s*:\\s*(\\d+)")
re = regexp.MustCompile("yt.setConfig\\('PLAYER_CONFIG', (.*?)\\);</script>")
re = regexp.MustCompile("yt.setConfig\\({'PLAYER_CONFIG': (.*?)}\\);")

matches := re.FindSubmatch(html)
if len(matches) < 2 {
Expand Down

0 comments on commit 44fe64b

Please sign in to comment.