Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
Thank you. Seriously. THANK YOU! It took me a while to figure everything out, so if you're like me and plan on using this script to batch download HCB galleries with the correct page order, here's what you do. 1. Open up DownThemAll
|
|
|
Funny thing, I had already made it work for simple and one-page and accidentally deleted it before you updated it :D
EDIT: Corrected diff :|
@@ -179,11 +179,15 @@
var il = document.createElement("A");
il.href = oldref;
il.innerHTML = "[Std]";
- if (i >= FileNames.snapshotLength) continue;
var fn = FileNames.snapshotItem(i);
- if (fn==null) continue;
- fn.parentNode.insertBefore(il, fn.nextSibling);
- fn.parentNode.insertBefore(document.createTextNode("\u00a0"), il);//nbsp
+ if (fn!=null) {
+ fn.parentNode.insertBefore(il, fn.nextSibling);
+ fn.parentNode.insertBefore(document.createTextNode("\u00a0"), il);//nbsp
+ }
+ else {
+ anchor.parentNode.insertBefore(il, anchor.nextSibling);
+ anchor.parentNode.insertBefore(document.createElement("br"), il);
+ }
}
}
|
|
|
merged :) |
|
|
@darodi: Hey, let's play cat and mouse :D. I updated my version before noticing you had alreeady adopted it so take a look at the changes (mostly because it fixes a certain bug I had with unnamed images... ;) |
|
|
@darodi: Answered in mine's page :) |
|
|
@nips9901: could you explain me what is the point of keeping those random unsorted filenames?
|
|
|
First of all thank you, it has been saving me a lot of trouble, clicks and time :) Feel free to consider the text below spam but IMHO some users might be interested ;)
|
|
|
great script - thanks
If you make theese changes to darodis script the output can be used to download all images with my batchfile:
The output below any gallary will look similar to " You just need to save the following code to C:\Downloads\IFap\ifapdler.cmd for example.
@echo off
if not "%OS%"=="Windows_NT" echo Das Betriebsystem ist nicht WinNTx && pause && exit /b
VERIFY OTHER 2>nul
SETLOCAL ENABLEEXTENSIONS
IF ERRORLEVEL 1 echo Befehlserweiterungen konnten nicht aktiviert werden - quiting... && pause && exit /b
setlocal
set IFDver=v0.4
set globTryCnt=0
set globMCnt=0
set globDlCnt=0
REM ImageListFile
set ILF="%~1"
REM MissingListFile
set MLF=missing
set wgetlog=ifapdlog
set limitTryCnt=5
set limitFSize=1000
title ImageFap Downloader %IFDver% by Limer
echo.
if %ILF%=="" set /P ILF= ImageListFile:
for /F "usebackq tokens=*" %%i in ('%ILF%') do set ILF="%%~i"
REM Change working directory
FOR %%I IN (%ILF%) do (
%%~dI
cd "%%~pI"
)
echo Workingdir: "%CD%"
if not exist %ILF% goto :EOF
if exist "%MLF%.log" (
if exist "%MLF%.bak" del "%MLF%.bak"
ren "%MLF%.log" "%MLF%.bak"
)
if exist "%wgetlog%.log" (
if exist "%wgetlog%.bak" del "%wgetlog%.bak"
ren "%wgetlog%.log" "%wgetlog%.bak"
)
FOR /F "usebackq tokens=1,2,3 delims=^^" %%M in (`type %ILF%`) do call :dler "%%M" "%%N" "%%O"
echo. >>"%wgetlog%.log"
echo.
echo %globDlCnt% images successfuly downloaded to "%CD%".>>"%wgetlog%.log"
echo (%globTryCnt% retrys and %globMCnt% missing files)>>"%wgetlog%.log"
echo %globDlCnt% images successfuly downloaded to "%CD%".
echo (%globTryCnt% retrys and %globMCnt% missing files)
set ccl=%CMDCMDLINE%
for /F "usebackq" %%I in (`echo %ccl% ^| %SystemRoot%\System32\find.exe /I /C "/C"`) do if "%%I"=="1" (
title fin. "%CD%"
pause
)
goto :EOF
:dler
REM %1=FileName %2=Ext %3=Adress
set spacer= &&echo.
REM In case the file extension is .jpeg it is replaced with .jpg
if /I "%~2"=="jpeg" (set dlf=%~1.jpg) ELSE set dlf=%~1.%~2
set /A trycnt=0
:retry
set /A trycnt+=1
echo dler: "%dlf%" - Try%spacer%%trycnt%
start /BELOWNORMAL /MIN /WAIT wget -b -nv -a "%wgetlog%.log" -O "%dlf%" "%~3"
FOR %%I IN ("%dlf%") do if %%~zI LSS %limitFSize% (
if %trycnt% LSS %limitTryCnt% (
set /A globTryCnt+=1
set spacer= %spacer%
goto :retry
) ELSE (
set /A globMCnt+=1
echo %~1^^%~2^^%~3>>"%MLF%.log"
echo dler: "%dlf%" - Failed (look at "%MLF%.log")
)
) ELSE (
set /A globDlCnt+=1
)
echo. >>"%wgetlog%.log"
goto :EOF
I almost forgot: you'll need wget somewhere in your %PATH% |
|
|
To save images in downthemall without getimg.php click on "remaining mask" and type *name*.jpg or whatever file extension your using. also remember to click on "rename" for the option (if a file name already exists) in main preferences |
|
|
request Tie into the extension DownThemAll -- it can pass a referer back to the webhost
|
|
|
@r0ssar00 How could .js executable?
Thank you very much |
|
|
as requested, I also added a wget script generator.
|
|
|
tip for everyone: you can download the entire galery by installing cruiser, then the latest version of imagefap direct images++ (i think it will only work in that order but i haven't tried anything else)
when they are installed, go tools->greasemonkey->manage user scripts...
when cruiser loads the gallery, scroll all the way to the bottom and click "Click here to generate a script" blah blah blah.
my system: i created a jscript script to insert a sleep every 10 pics so that a million wget's won't be open and your net connection will still work with decent speed
// sleeptime controls the amount of seconds between 10 pic downloads
var sleeptime = 3;
var fs,fs2,infile,outfile,ForReading;
var Args = WScript.Arguments;
ForReading = 1;
fs = new ActiveXObject("Scripting.FileSystemObject");
fs2 = new ActiveXObject("Scripting.FileSystemObject");
infile = fs.OpenTextFile(Args(0),1,false);
outfile = fs2.OpenTextFile(Args(1),2,true);
var counter = 0;
var line = "";
outfile.WriteLine("@echo off")
while (infile.AtEndOfStream==false)
{
counter = counter + 1;
if (Args(2)=="startsleep") {
line = "start /min " + infile.ReadLine();
}
if (Args(2)=="startnosleep") {
line = "start /min " + infile.ReadLine();
}
if (Args(2)!="startsleep" && Args(2)!="startnosleep") {
line = infile.ReadLine();
}
if (counter==10)
{
outfile.WriteLine("@echo on");
outfile.WriteLine(line);
outfile.WriteLine("@echo off");
if (Args(2)=="startsleep") {
outfile.WriteLine("sleep " + sleeptime);
}
if (Args(2)=="nostartsleep") {
outfile.WriteLine("sleep " + sleeptime);
}
counter = 0;
} else {
outfile.WriteLine(line);
}
}
theres probably extra stuff in there but i don't care, it works. usage: addsleep.js origdownload.bat newdownload.bat mode where mode is one of: startsleep - adds a start /min in front of each wget call and adds a sleep for sleeptime every 10 pics startnosleep - adds a start /min in front of each wget call and does not add a sleep nostartsleep - doesn't add a start /min but sleeps for sleeptime every 10 pics anything else - doesn't sleep or add a start mode has to be something, if you don't want a sleep or a start, use asdf or something change the sleeptime for what you want the delay between 10 pics to be i named it addsleep.js and put it in my windows\system32 folder i also set up another batch script called ddownload.bat in my windows\system32 folder
@echo off notepad download.bat addsleep download.bat real.bat nostartsleep del download.bat move real.bat download.bat download.bat which opens notepad with a new file called download.bat, adds the sleeps, but no starts, and starts the download my process: 1) find a gallery
|
|
|
Is there any way to save these images without them being renamed to getimg.php? Particularly when using a mass downloader like DownThemAll? |
|
|
Thanks but I can't get this to work properly. I keep ending up with missing images and incomplete truncated pics (like half a pic and then garbage in the bottom bit). I've been using the free version of Bulk Image Downloader to download from imagefap and it doesn't seem to have any of these problems. Any ideas? |
|
|
script working great.. thanks.. |
|
|
bipsync:
|
|
|
hi.. your script is nice.. but now.. it only works when i click the one page or simple view function on imagefap page.. have to switch between the view.. any help.. sorry for my english.. |
|
|
VoodooGlowSkull:
|
|
|
Thanks for the nice script. I have replaced the "gallery.php" with "ajax_gallery_display" and like the results. Clicking on a gallery link in a browse gallieries page or user gallery page obviously still takes me to the first 'gallery.php' page instead of the ajax page. How do I modify the script so that I never see the first 'gallery.php' page but rather go straight to the ajax one from a gallery list page? |
|
|
oops .. I forgot...
|
|
|
grokis:
for you second question, if you are too tired to press back why don't you just open the gallery in a new tab and keep the gallery list in the first one? :) |
|
|
Ah and also another problem that comes from the complete site reloading; when I clicked through to page 5 e.g. I have to use the 'back' function 6 times to be on the gallery overview page again, that sucks a bit, because on the original site you only have to click once...
Thanks! |
|
|
Hello,
Also I tried to write a script but didn't had that much success - I wanted to modify your script so that all Javascript is removed from the site and all those stuff at the top is removed; is that possible? Thank you |
