Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(function() {
function escapeQuote(str) {
return str.replace("\"", "\\\"");
}
function buildAria2Url(name, url) {
return `aria2c -c -s10 -k1M -x16 --enable-rpc=false ` +
`-o "${escapeQuote(name)}" ` +
`--header "${escapeQuote(window.navigator.userAgent)}" ` +
`--header "Referer: ${escapeQuote(window.location.toString())}" ` +
`--header "Cookie: ${escapeQuote(window.document.cookie)}" ` +
`"${escapeQuote(url)}"`;
}
const id = Math.random().toString(36).substring(7);
webpackJsonp([2], {
[id]: function(m, e, r) {
const lookupWYFunction = function(name) {
return Object.values(r.c).map((x) => x.exports).filter((x) => x[name] !== undefined);
};
const list = document.querySelector(".list-group-bd").__vue__.selectedList;
const getSingleUrl = lookupWYFunction("getSingleUrl")[0].getSingleUrl;
list.map(node => {
getSingleUrl(node).then(data => {
console.log(buildAria2Url(node.getName(), data.https_download_url));
}, error => {
console.warn(error);
});
});
}
}, [id]);
})();
@JayXon

This comment has been minimized.

Copy link

@JayXon JayXon commented Sep 16, 2018

Doesn't work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.