Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Fusker link parsing; code to specific that the values from two ranges MUST match

Writer Mia Lopez

So, while I'm fairly tech savvy, I know just about nothing when it comes to scripts and coding. What I'm trying to do is find how to write out a link with two separate ranges in which the two numbers MUST match to generate the proper URL (it's for fusker links).

For example: I know the brackets indicate a range in which it will identify every number in that range and generate a link with it, however, it does it for ALL of them in order. I get 5300/5301.zip, and 5300/5302.zip and so on.

/zips/[5300-5399]/[5300-5399].zip

What I want is what code I have to input in order for it to require those two values within the ranges match one another to generate the proper URL.

EXAMPLE: /zips/5399/5399.zip

So that way it ONLY generates the URL if both the numbers generated match.

If it helps, this is the website/page I'm using to generate the links for me:

Thanks in advance.

~Nick

1 Answer

You can do this with regular JavaScript - your question seems to be about using NeoDownloader's website, which isn't actually part of StackOverflow. To generate a list of links in that range in that format, just do:

let counter = 5300;
let limit = 5399;
for (counter; counter <= limit; counter++) { console.log(`/zips/${counter}/${counter}.zip`);
}
.as-console-wrapper { max-height: 100% !important; top: auto; }

(note the above only displays the last fifty results)

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.