It's not really a bug, but the original code intended the ID for Loom videos to be at most 32 characters. For example, https://www.loom.com/share/4a2a8baf124c4390954dcbb46a58cfd7.
However, apparently Loom has a longer URL variant that has the title encoded as well such as https://www.loom.com/share/Unlocking-Incredible-Organizational-Velocity-with-Async-Video-4a2a8baf124c4390954dcbb46a58cfd7.
However, I did notice that in this longer variant URL form, the URL actually contains the ID right at the end of the path. For example in https://www.loom.com/share/Unlocking-Incredible-Organizational-Velocity-with-Async-Video-4a2a8baf124c4390954dcbb46a58cfd7, the ID of the video is 4a2a8baf124c4390954dcbb46a58cfd7.
Solving Attempt
So, what I did is pretty much utilize the function aliasURL in url.js to provide support for this URL variant. Then, I changed the URL pathname to the correct format so the patternMatch is the exact ID to be later on tested by the tester pattern by extracting the last 32 characters from the supposed id containing more than 32 characters. Here's the code mentioned.
I've done a manual test using Yaak and it succeeds in the supposedly unyielding URLs.
I've run npm run test as well and met some failures in reddit, streamable, and vimeo test cases but this is because those sites are banned in my country. It shouldn't affect those at all though.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/imputnet/cobalt/pull/832
**Author:** [@styxnanda](https://github.com/styxnanda)
**Created:** 10/10/2024
**Status:** ✅ Merged
**Merged:** 2/11/2025
**Merged by:** [@wukko](https://github.com/wukko)
**Base:** `main` ← **Head:** `loom-fix-branch`
---
### 📝 Commits (2)
- [`ab52297`](https://github.com/imputnet/cobalt/commit/ab52297613f10b6749ec41030abb8c9a5dd15836) api/src/services/url: support for longer Loom URL variant containing content ID
- [`0c1f6b5`](https://github.com/imputnet/cobalt/commit/0c1f6b56dc18f244c6c49e38d67eda508091817e) api/processing: reformat
### 📊 Changes
**1 file changed** (+8 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `api/src/processing/url.js` (+8 -0)
</details>
### 📄 Description
## Background
This is in response to #799.
It's not really a bug, but the original code intended the ID for Loom videos to be at most 32 characters. For example, `https://www.loom.com/share/4a2a8baf124c4390954dcbb46a58cfd7`.
However, apparently Loom has a longer URL variant that has the title encoded as well such as `https://www.loom.com/share/Unlocking-Incredible-Organizational-Velocity-with-Async-Video-4a2a8baf124c4390954dcbb46a58cfd7`.
However, I did notice that in this longer variant URL form, the URL actually contains the ID right at the end of the path. For example in `https://www.loom.com/share/Unlocking-Incredible-Organizational-Velocity-with-Async-Video-4a2a8baf124c4390954dcbb46a58cfd7`, the ID of the video is `4a2a8baf124c4390954dcbb46a58cfd7`.
## Solving Attempt
So, what I did is pretty much utilize the function `aliasURL` in `url.js` to provide support for this URL variant. Then, I changed the URL pathname to the correct format so the patternMatch is the exact ID to be later on tested by the tester pattern by extracting the last 32 characters from the supposed `id` containing more than 32 characters. Here's the code mentioned.
```Javascript
case "loom":
const idPart = parts[parts.length - 1];
if(idPart.length > 32){
const actualIdPart = idPart.slice(-32);
url.pathname = `/share/${actualIdPart}`;
}
break;
```
## Test Result
I've done a manual test using Yaak and it succeeds in the supposedly unyielding URLs.

I've run `npm run test` as well and met some failures in reddit, streamable, and vimeo test cases but this is because those sites are banned in my country. It shouldn't affect those at all though.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/imputnet/cobalt/pull/832
Author: @styxnanda
Created: 10/10/2024
Status: ✅ Merged
Merged: 2/11/2025
Merged by: @wukko
Base:
main← Head:loom-fix-branch📝 Commits (2)
ab52297api/src/services/url: support for longer Loom URL variant containing content ID0c1f6b5api/processing: reformat📊 Changes
1 file changed (+8 additions, -0 deletions)
View changed files
📝
api/src/processing/url.js(+8 -0)📄 Description
Background
This is in response to #799.
It's not really a bug, but the original code intended the ID for Loom videos to be at most 32 characters. For example,
https://www.loom.com/share/4a2a8baf124c4390954dcbb46a58cfd7.However, apparently Loom has a longer URL variant that has the title encoded as well such as
https://www.loom.com/share/Unlocking-Incredible-Organizational-Velocity-with-Async-Video-4a2a8baf124c4390954dcbb46a58cfd7.However, I did notice that in this longer variant URL form, the URL actually contains the ID right at the end of the path. For example in
https://www.loom.com/share/Unlocking-Incredible-Organizational-Velocity-with-Async-Video-4a2a8baf124c4390954dcbb46a58cfd7, the ID of the video is4a2a8baf124c4390954dcbb46a58cfd7.Solving Attempt
So, what I did is pretty much utilize the function
aliasURLinurl.jsto provide support for this URL variant. Then, I changed the URL pathname to the correct format so the patternMatch is the exact ID to be later on tested by the tester pattern by extracting the last 32 characters from the supposedidcontaining more than 32 characters. Here's the code mentioned.Test Result
I've done a manual test using Yaak and it succeeds in the supposedly unyielding URLs.

I've run
npm run testas well and met some failures in reddit, streamable, and vimeo test cases but this is because those sites are banned in my country. It shouldn't affect those at all though.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.