From daa2856d92f5391f7ddc7763350380d226e87e2c Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 8 Mar 2023 13:17:33 +0600 Subject: [PATCH] 5.1.2 - added women's day celebration emoji - fixed vk user id extraction --- package.json | 4 ++-- src/config.json | 3 ++- src/front/emoji/biceps.svg | 7 +++++++ src/modules/emoji.js | 3 ++- src/modules/processing/services/vk.js | 2 +- src/modules/processing/servicesConfig.json | 2 +- 6 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 src/front/emoji/biceps.svg diff --git a/package.json b/package.json index ab01ad5..66881e8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cobalt", "description": "save what you love", - "version": "5.1.1", + "version": "5.1.2", "author": "wukko", "exports": "./src/cobalt.js", "type": "module", @@ -33,6 +33,6 @@ "node-cache": "^5.1.2", "url-pattern": "1.0.3", "xml-js": "^1.6.11", - "youtubei.js": "^3.1.0" + "youtubei.js": "^3.1.1" } } diff --git a/src/config.json b/src/config.json index 3caf79f..7828252 100644 --- a/src/config.json +++ b/src/config.json @@ -51,7 +51,8 @@ "12-28": "🎄", "12-29": "🎄", "12-30": "🎄", - "12-31": "🎄" + "12-31": "🎄", + "03-08": "💪" }, "supportedAudio": ["mp3", "ogg", "wav", "opus"], "ffmpegArgs": { diff --git a/src/front/emoji/biceps.svg b/src/front/emoji/biceps.svg new file mode 100644 index 0000000..4de9e74 --- /dev/null +++ b/src/front/emoji/biceps.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/modules/emoji.js b/src/modules/emoji.js index a8ca4a6..a2d9a0e 100644 --- a/src/modules/emoji.js +++ b/src/modules/emoji.js @@ -22,7 +22,8 @@ const names = { "🐘": "elephant", "🐦": "bird", "🐙": "octopus", - "🔮": "crystal_ball" + "🔮": "crystal_ball", + "💪": "biceps" } let sizing = { 22: 0.4, diff --git a/src/modules/processing/services/vk.js b/src/modules/processing/services/vk.js index 58f20cd..64eb43e 100644 --- a/src/modules/processing/services/vk.js +++ b/src/modules/processing/services/vk.js @@ -24,7 +24,7 @@ const resolutionMatch = { export default async function(o) { let html; - html = await fetch(`https://vk.com/video-${o.userId}_${o.videoId}`, { + html = await fetch(`https://vk.com/video${o.userId}_${o.videoId}`, { headers: { "user-agent": genericUserAgent } }).then((r) => { return r.text() }).catch(() => { return false }); if (!html) return { error: 'ErrorCouldntFetch' }; diff --git a/src/modules/processing/servicesConfig.json b/src/modules/processing/servicesConfig.json index a12d800..acc6919 100644 --- a/src/modules/processing/servicesConfig.json +++ b/src/modules/processing/servicesConfig.json @@ -18,7 +18,7 @@ }, "vk": { "alias": "vk video & clips", - "patterns": ["video-:userId_:videoId", "clip-:userId_:videoId", "clips-:duplicate?z=clip-:userId_:videoId"], + "patterns": ["video:userId_:videoId", "clip:userId_:videoId", "clips:duplicate?z=clip:userId_:videoId"], "enabled": true }, "youtube": {