package main
import (
"fmt"
"io/ioutil"
"github.com/odwrtw/addicted"
)
func main() {
user := "username"
passwd := "yourpassword"
// Create a client
addic, err := addicted.NewWithAuth(user, passwd)
// Or
// addic, err := addicted.New()
// Get the list of shows ( addicted has its own system of IDs )
// shows, err := addic.GetTvShows()
// if err != nil {
// fmt.Println(err)
// }
// Get the susbtitles ( House of cards S01E01 )
subs, err := addic.GetSubtitles("3103", 1, 1)
if err != nil {
fmt.Println(err)
}
// Filter the results on the lang
subs = subs.FilterByLang("french")
// Download it
subtitle, err := ioutil.ReadAll(&subs[0])
if err != nil {
panic(err)
}
ioutil.WriteFile("test.srt", subtitle, 0644)
}
-
Notifications
You must be signed in to change notification settings - Fork 0
odwrtw/addicted
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published