Give information about video author.

master
Robert S. Gerus 2015-12-24 09:53:50 +01:00
parent 4998f0b548
commit 37f5ac96d5
2 changed files with 3 additions and 3 deletions

View File

@ -818,7 +818,7 @@ var variableOutputTestEvents = []struct {
Name: "idontexist",
},
},
outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up"),
outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up by RickAstleyVEVO$"),
function: linktitle,
},
{
@ -830,7 +830,7 @@ var variableOutputTestEvents = []struct {
Name: "idontexist",
},
},
outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up"),
outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up by RickAstleyVEVO$"),
function: linktitle,
},
}

View File

@ -38,7 +38,7 @@ func youtube(vid string) string {
if err != nil {
return "error decoding data from youtube"
}
return dat["title"].(string)
return fmt.Sprint(dat["title"].(string), " by ", dat["author_name"].(string))
}
func youtubeLong(l string) string {