diff --git a/utils/converters.js b/utils/converters.js index 6e17567..d723cda 100644 --- a/utils/converters.js +++ b/utils/converters.js @@ -66,8 +66,15 @@ function rewriteVideoDescription(descriptionHtml, id) { // https://www.youtube.com/watch?v=fhum63fAwrI www.youtube.com/watch?v= // https://www.youtube.com/watch?v=i-szWOrc3Mo www.youtube.com/ (unsupported by cloudtube currently) // https://www.youtube.com/watch?v=LSG71wbKpbQ www.youtube.com/channel/ + // https://www.youtube.com/watch?v=RiEkOKFOG3s youtu.be/ with params - descriptionHtml = descriptionHtml.replace(new RegExp(`([^<]+)`, "g"), `$3`) + descriptionHtml = descriptionHtml.replace(new RegExp(`([^<]+)`, "g"), (_, id, params, innerText) => { + if (params) { + return `${innerText}` + } else { + return `${innerText}` + } + }) descriptionHtml = descriptionHtml.replace(new RegExp(`([^<]+)<\/a>`, "g"), `$2`) descriptionHtml = descriptionHtml.replace(new RegExp(`(?:([0-9]*):)?([0-5]?[0-9]):([0-5][0-9])`, "g"), (_, hours, minutes, seconds) => { let timeURL, timeDisplay, timeSeconds