mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-09 22:38:10 -05:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96225d4aea | ||
|
|
adcdc0cf0b | ||
|
|
e3f9b12fde | ||
|
|
7fa4c0a030 | ||
|
|
8a3fa9337c |
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## v1.4.353 (2025-12-19)
|
||||
|
||||
### PR [#1887](https://github.com/danielmiessler/Fabric/pull/1887) by [bvandevliet](https://github.com/bvandevliet): feat: correct video title and added description to yt transcript api response
|
||||
|
||||
- Feat: correct video title (instead of id) and added description to yt transcript api response
|
||||
- Updated API documentation.
|
||||
|
||||
## v1.4.352 (2025-12-18)
|
||||
|
||||
### PR [#1886](https://github.com/danielmiessler/Fabric/pull/1886) by [ksylvan](https://github.com/ksylvan): Enhanced Onboarding and Setup Experience
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package main
|
||||
|
||||
var version = "v1.4.352"
|
||||
var version = "v1.4.353"
|
||||
|
||||
Binary file not shown.
@@ -278,7 +278,9 @@ Extract transcripts from YouTube videos.
|
||||
|
||||
```json
|
||||
{
|
||||
"videoId": "Video ID",
|
||||
"title": "Video Title",
|
||||
"description" : "Video description...",
|
||||
"transcript": "Full transcript text..."
|
||||
}
|
||||
```
|
||||
@@ -335,7 +337,9 @@ Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"videoId": "dQw4w9WgXcQ",
|
||||
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
|
||||
"description": "The official video for “Never Gonna Give You Up” by Rick Astley...",
|
||||
"transcript": "We're no strangers to love. You know the rules and so do I..."
|
||||
}
|
||||
```
|
||||
|
||||
@@ -19,8 +19,10 @@ type YouTubeRequest struct {
|
||||
}
|
||||
|
||||
type YouTubeResponse struct {
|
||||
Transcript string `json:"transcript"`
|
||||
Title string `json:"title"`
|
||||
Transcript string `json:"transcript"`
|
||||
VideoId string `json:"videoId"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
func NewYouTubeHandler(r *gin.Engine, registry *core.PluginRegistry) *YouTubeHandler {
|
||||
@@ -55,6 +57,12 @@ func (h *YouTubeHandler) Transcript(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
var metadata *youtube.VideoMetadata
|
||||
if metadata, err = h.yt.GrabMetadata(videoID); err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
var transcript string
|
||||
if req.Timestamps {
|
||||
transcript, err = h.yt.GrabTranscriptWithTimestamps(videoID, language)
|
||||
@@ -66,5 +74,5 @@ func (h *YouTubeHandler) Transcript(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, YouTubeResponse{Transcript: transcript, Title: videoID})
|
||||
c.JSON(http.StatusOK, YouTubeResponse{Transcript: transcript, VideoId: videoID, Title: metadata.Title, Description: metadata.Description})
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
"1.4.352"
|
||||
"1.4.353"
|
||||
|
||||
Reference in New Issue
Block a user