aboutsummaryrefslogtreecommitdiff
path: root/ytparser.go
diff options
context:
space:
mode:
Diffstat (limited to 'ytparser.go')
-rw-r--r--ytparser.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ytparser.go b/ytparser.go
index dc6f986..0382479 100644
--- a/ytparser.go
+++ b/ytparser.go
@@ -178,7 +178,7 @@ func request(query string, page int, lang string) (string, error) {
}
idx += len(initString)
startData := body[idx:]
- pattern := regexp.MustCompile(`; *\n`)
+ pattern := regexp.MustCompile(`; *(\n|<\/script>)`)
loc := pattern.FindIndex(startData)
startData = startData[:loc[0]]
return string(startData), nil