From 13c2884a413c90f7d86cffe4a54e6e5aff3a0995 Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 17 Dec 2022 17:22:39 +0600 Subject: [PATCH] updated readme and fixed some things --- README.md | 29 ++++++++++++++++------------- src/modules/services/bilibili.js | 2 +- src/modules/services/reddit.js | 2 +- src/modules/services/soundcloud.js | 8 ++++---- src/modules/services/tiktok.js | 4 ++-- src/modules/services/tumblr.js | 2 +- src/modules/services/twitter.js | 12 ++++++------ src/modules/services/vimeo.js | 4 ++-- src/modules/services/vk.js | 2 +- 9 files changed, 34 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 30363a3..f8d86b4 100644 --- a/README.md +++ b/README.md @@ -13,19 +13,22 @@ cobalt is social media downloader with zero bullshit. It's friendly, accessible, It preserves original media quality so you get best downloads possible (unless you change that in settings). ## Supported services -| Service | Video + Audio | Only audio | Additional features | -| -------- | :---: | :---: | :----- | -| Twitter | ✅ | ✅ | Ability to save multiple videos/GIFs from a single tweet. | -| Twitter Spaces | ❌️ | ✅ | Audio metadata. | -| YouTube & Shorts | ✅ | ✅ | Support for 8K, 4K, HDR, and high FPS videos. | -| YouTube Music | ❌ | ✅ | Audio metadata. | -| Reddit | ✅ | ✅ | | -| TikTok & douyin | ✅ | ✅ | Video downloads with or without watermark; image slideshow downloads without watermarks. | -| SoundCloud | ❌ | ✅ | Audio metadata. | -| bilibili.com | ✅ | ✅ | | -| Tumblr | ✅ | ✅ | | -| Vimeo | ✅ | ❌️ | | -| VK Videos & Clips | ✅ | ❌️ | | +| Service | Video + Audio | Only audio | Additional features | +| -------- | :---: | :---: | :----- | +| Twitter | ✅ | ✅ | Ability to save multiple videos/GIFs from a single tweet. | +| Twitter Spaces | ❌️ | ✅ | Audio metadata. | +| YouTube & Shorts | ✅ | ✅ | Support for 8K, 4K, HDR, and high FPS videos. | +| YouTube Music | ❌ | ✅ | Audio metadata. | +| Reddit | ✅ | ✅ | | +| TikTok & douyin | ✅ | ✅ | Video downloads with or without watermark; image slideshow downloads without watermarks. | +| SoundCloud | ❌ | ✅ | Audio metadata. | +| bilibili.com | ✅ | ✅ | | +| Tumblr | ✅ | ✅ | | +| Vimeo | ✅ | ❌️ | | +| VK Videos & Clips | ✅ | ❌️ | | + +## cobalt API +cobalt has an open API that you can use for free. It's pretty straightforward in use, [check out the docs](https://github.com/wukko/cobalt/blob/current/docs/API.md) and see for yourself. ## How to contribute translations You can translate cobalt to any language you want on [cobalt's crowdin](https://crowdin-co.wukko.me/). Feel free to ignore QA errors if you think you know better. If you don't see a language you want to translate cobalt to, open an issue, and I'll add it to crowdin. diff --git a/src/modules/services/bilibili.js b/src/modules/services/bilibili.js index 367e538..5d1902f 100644 --- a/src/modules/services/bilibili.js +++ b/src/modules/services/bilibili.js @@ -4,7 +4,7 @@ export default async function(obj) { try { let html = await fetch(`https://bilibili.com/video/${obj.id}`, { headers: {"user-agent": genericUserAgent} - }).then(async (r) => {return r.text()}).catch(() => {return false}); + }).then((r) => {return r.text()}).catch(() => {return false}); if (!html) return { error: 'ErrorCouldntFetch' }; if (html.includes('