Compare commits

...

2 Commits

Author SHA1 Message Date
ThePendulum 5487903b27 1.27.3 2023-06-05 04:16:52 +02:00
ThePendulum 0d2bc9024f Stripping query for URL matching. 2023-06-05 04:16:48 +02:00
3 changed files with 6 additions and 4 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "ripunzel",
"version": "1.27.2",
"version": "1.27.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "ripunzel",
"version": "1.27.2",
"version": "1.27.3",
"license": "ISC",
"dependencies": {
"array.prototype.flatten": "^1.2.1",

View File

@ -1,6 +1,6 @@
{
"name": "ripunzel",
"version": "1.27.2",
"version": "1.27.3",
"description": "Web content archiving tool, with versatile filename patterns and extensive options for reddit user profiles.",
"main": "app.js",
"scripts": {

View File

@ -118,7 +118,9 @@ module.exports = function dissectLink(url) {
return acc;
}
const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes
// const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes
const { origin, pathname } = new URL(url);
const match = host.pattern.match(`${origin}${pathname}`); // remove double slashes
if (match) {
return Object.assign(match, {