m3u8_native
This commit is contained in:
15
goutubedl.go
15
goutubedl.go
@ -185,10 +185,11 @@ type Subtitle struct {
|
||||
}
|
||||
|
||||
type Caption struct {
|
||||
Ext string `json:"ext"`
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Bytes []byte `json:"-"`
|
||||
Ext string `json:"ext"`
|
||||
Protocol string `json:"protocol"`
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Bytes []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (f Format) String() string {
|
||||
@ -495,6 +496,12 @@ func infoFromURL(
|
||||
if options.DownloadSubtitlesFormat != "" && caption.Ext != options.DownloadSubtitlesFormat {
|
||||
continue
|
||||
}
|
||||
|
||||
// filter out m3u8_native protocol
|
||||
if caption.Protocol != "" {
|
||||
continue
|
||||
}
|
||||
|
||||
resp, respErr := get(caption.URL)
|
||||
if respErr == nil {
|
||||
buf, err := io.ReadAll(resp.Body)
|
||||
|
Reference in New Issue
Block a user