mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
chore(deps): remove node-fetch, migration to node v18 fetch API
This commit is contained in:
@ -3,7 +3,6 @@ const { join } = require('node:path');
|
||||
const { ipcMain } = require('electron');
|
||||
const is = require('electron-is');
|
||||
const { convert } = require('html-to-text');
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const { cleanupName } = require('../../providers/song-info');
|
||||
const { injectCSS } = require('../utils');
|
||||
@ -99,7 +98,7 @@ const getLyrics = async (url) => {
|
||||
}
|
||||
|
||||
const html = await response.text();
|
||||
const lyrics = convert(html, {
|
||||
return convert(html, {
|
||||
baseElements: {
|
||||
selectors: ['[class^="Lyrics__Container"]', '.lyrics'],
|
||||
},
|
||||
@ -116,7 +115,6 @@ const getLyrics = async (url) => {
|
||||
},
|
||||
},
|
||||
});
|
||||
return lyrics;
|
||||
};
|
||||
|
||||
module.exports.toggleRomanized = toggleRomanized;
|
||||
|
||||
Reference in New Issue
Block a user