Auto-download with XHR
![]() ![]() |
Hey Shaun, Can you please copy + paste my code in a compatible implementation for this script?? It's amazing-- but XHR autodownload tops it all off. The script I want you to copy from is: http://userscripts.org/scripts/review/43390 The two main things are cookie erasing (i.e., download as much as you want), and XMLHttprequest downloading. Currently I've just overwritten your load_image function, used the title as a "status" center and it works pretty well:
function load_image(data)
{
function single(A) {return document.evaluate(A,document,null,9,null).singleNodeValue}
var gif = new GIF();
gif.from_array(data_array(data));
document = unsafeWindow.document;
const cooks = ["__utma", "__utmb", "__utmc", "__utmz", "mc_popt"];
for(var i = cooks.length - 1; i>=0; --i)
document.cookie = cooks[i] + "=" + ";domain=megaupload.com;expires=Thu, 01-Jan-1970 00:00:01 GMT";
GM_xmlhttpRequest({
url : location.href,
method : "POST",
headers : {
"Content-Type" : "application/x-www-form-urlencoded",
"User-Agent" : "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; InfoPath.2; MEGAUPLOAD 2.0)" // possible foreign hack
},
onload : function(A) {
if(A.responseText.match(/oadlink"><a href="([^"]+)/)) {
location.href=RegExp.$1;
document.title = "Downloading...";
} else {
document.title = "Retrying..." + e;
location.reload();
}
},
data : "captchacode="+single("//input[@name='captchacode']").value +
"&megavar="+single("//input[@name='megavar']").value +"&captcha=" + decode(gif)
});
}
If you say yes, I can send you a draft of what I have in mind (Message center, xhr autodownload, xhr auto-try instead of reloading page). What do you think? |
![]() ![]() |
Hi,
|
![]() ![]() |
Hi Shaun, sorry for the delay in this as well, I'm busy as well at the moment. If you need me fast, email me (aavindraa@gmail.com). I wrote the script with a message center + auto download w/ XHR, and it is absolutely beautiful. Basically, it cracks at the captcha over and over until it gets it, automatically, without ever refreshing the page. (And I added my cookie eraser to allow more downloading :-)) Here's the sauce (set to expire in 3 days, if you don't catch it by then, I still have it): Here's an install link: http://pastebin.ca/raw/1532232#a.user.js I also optimized parts of the code, and beautified the whitespace. Overall, it is smaller in filesize now. |
![]() ![]() |
@The two main things are cookie erasing (i.e., download as much as you want) avindra im using this script here ,i can download many at the same time but i have 2 issues.First i'd rather have a doqnload Q is this possible with this? 2nd one is after sometime it sez i exceeded the download limit i have to wait, ure cookie erasing option can it be added on this script? thx |
![]() ![]() |
I have no idea what you wrote and I'm not going to bother to read it properly, but about a download queue: possible, but it'd have extremely hokey workarounds because of Greasemonkey's bullshit sandbox. As for the exceeding bandwith, yes that can be overcome with my modified version. @Shn: I uploaded the modded script here because many people are asking me to re-upload it: |


