parseAddress = (url) => {
const parsed = { indices: [] };
const base = url.substring(
url.indexOf("<img src=") + 38,
url.indexOf("/></a>") - 5
);
for (let i = 0; i < base.length; i++) {
if (base[i] === "/") {
parsed.indices.push(i);
}
}
parsed.ark = base.substr(0, parsed.indices[2]);
const getSubstring = (str, index) =>
str.substr(
parsed.indices[index] + 1,
parsed.indices[index + 1] - parsed.indices[index] - 1
);
parsed.vue = getSubstring(base, 2);
parsed.region = getSubstring(base, 3);
parsed.size = getSubstring(base, 4);
parsed.rotation = getSubstring(base, 5);
parsed.quality = base.substr(parsed.indices[6] + 1);
return parsed;
}