Trying to figure out tricks for installing add-ons

I use Linux and often switch OS’s and use various machines. I need a way to expedite the configuration of mozilla without relying on firefox accounts (I know the accounts sync your add-ons). I have had great success configuring the preferences using a script, but I am running into a snag trying to get the add-ons going using command line.

My issue relates to how I can wget the files with just the actual download link. Since it is a sys-admin type of thing I really need these links to looking for the latest version, I will show in the most basic form the way I have found to do this with adblock plus:

wget https://addons.mozilla.org/firefox/downloads/latest/1865/addon-1865-latest.xpi

This method does in fact get the latest version each time. There are two other examples of using a link like that in this forum post:
Ask Ubuntu

Other than that one post I cannot find any other information about that way of installing. I assume there is a table somewhere that has the numbers in it, but I cannot find it. Additionally, I can’t find similar links when inspecting the HTML in the actual mozilla add-on download pages. All of those links look like this:
HTTPS Everywhere current download link

wget using that works but it doesn’t help me if I save it in a script and use it for a long time.

The issue I am having is that I am unable to locate links for the other addons that redirect to the new version. There appears to be a really nice system made for this and I just can’t figure out how to use it.

Depends on how you want to get to the numerical ID. If you just need to do this for a few add-ons, an easy way is to view the source of the listing page and look for data-site-identifier.

In the case of AdblockPlus, you’ll find data-site-identifier="1865"