Repository navigation
v2.0.0: gobalt version 2 is live!
Hello! It's been quite some time, huh?
Today, cobalt has updated it's API, and we have updated the library too! Here's what changed (a lot, breaking changes even)
Additions:
Proxy(bool): Now Cobalt can proxy files for you, default is false;AudioBitrate(int): You can changed audio bitrate downloaded from cobalt;Mode(downloadMode): Now you don't need to setAudioOnlyorVideOnlyto download only the audio or video. EitherAuto,AudioorMute;- File name is now returned from the api directly.
Changes:
- Default API url is
https://beta.cobalt.canine.toolshas there no public official instance api anymore; - Youtube dubbed audio language is now on Settings struct;
- Renamed
AudioFormat,FilenameStyle,TikTokFullAudio,TwitterConvertGif,VideoQuality,YoutubeDubbedAudio,YoutubeDubbedLanguageandYoutubeDubbedLanguage. - You can use your own http.Client now.
Default settings
New default options:
- Url: "" (empty);
- YoutubeVideoFormat:
H264; - VideoQuality:
1080; - AudioFormat:
Best; - AudioBitrate:
128; - FilenameStyle:
Basic; - TwitterConvertGif:
true; - Mode:
Auto; - YoutubeDubbedLanguage: en;
Run()
Now it only checks if the url was set or not.;
If it fails it will return the cobalt.error.code;
Cobalt instance list
Updated a lot of things, now it returns only v10.0.0 or higher cobalt instances, supported services, score (benchmark), protocol and trust
Useragent
Now the useragent is gobalt/2.0.0 (+https://github.com/lostdusty/gobalt/v2; go/go1.23.1; windows/amd64 (changes based on the library version, go version, os and arch)
Documentation
Added more documentation to the code, should be easier to understand now.