@@ -13,6 +13,7 @@ func bilibiliScrapContent(document *goquery.Document) string {
1313 document .Find ("span.desc-info-text,div.opus-module-content" ).Each (func (i int , s * goquery.Selection ) {
1414 var content string
1515 content , _ = goquery .OuterHtml (s )
16+ content = strings .Replace (content , "\n " , "<br>" , - 1 )
1617 contents += content
1718 })
1819 if contents != "" {
@@ -21,6 +22,7 @@ func bilibiliScrapContent(document *goquery.Document) string {
2122 document .Find ("p[class*='mediainfo_content_placeholder']" ).Each (func (i int , s * goquery.Selection ) {
2223 var content string
2324 content , _ = goquery .OuterHtml (s )
25+ content = strings .Replace (content , "\n " , "<br>" , - 1 )
2426 contents += content
2527 })
2628 add_img := ""
@@ -65,7 +67,7 @@ func (t *Template) BilibiliExtractorMetaInfo(url string, document *goquery.Docum
6567 contents := "<iframe width='910' height='668' src='" + embeddingUrl + "' border='0' scrolling='no' border='0 frameborder='no' framespacing='0' allowfullscreen='true' referrerpolicy='no-referrer'></iframe>"
6668 return content , author , publishedAt , contents , url , VideoFileType
6769 }
68- if strings .Contains (url , "bilibili.com/festival/" ) {
70+ if strings .Contains (url , "bilibili.com/video/" ) || strings . Contains ( url , "bilibili.com/ festival/" ) {
6971 return content , author , publishedAt , "" , url , VideoFileType
7072 }
7173 if strings .Contains (url , "audio/au" ) {
0 commit comments