Code: Select all
http://www.somedomain.com/?q=abc
http://www.somedomain.com/?q=abd
http://www.somedomain.com/?q=baa
etc.
Default wget behavior: if you try just
Code: Select all
wget http://www.somedomain.com/?q=abd
Solution: Since the very beginning I suspect, that the cause of error is "?" in local filename. But wget has many parameters, therefore I did not find the right one immediately. Also, I would recommend wget manual at http://www.gnu.org/software/wget/manual/wget.html. It is not only nicely formatted, but it is also more detailed than just wget --help (wget at Puppy is slightly older version, but the parameters are the same). The switch ‘--output-document=file’ (can be shortened to -O) is NOT the solution. The right parameter is ‘--restrict-file-names’. But surprisingly enough, ‘--restrict-file-names=unix’ doe NOT work, too. I almost gave up, but then I have made last one attempt. ‘--restrict-file-names=windows’ does help, even in Puppy (Quirky). "?" in filename is changed to "@". To sum up, my current set of wget parameters are:
Code: Select all
wget --restrict-file-names=windows -i list.txt -o logfile.txt --wait=3 --random-wait -U 'some WWW user string'
--restrict-file-names=windows is the key to solution (see above): Addendum: how to use depend on file system (Ext2 x FAT32): see next two posts.
-i list.txt list of the file to be downloaded are taken from specified file
-o logfile.txt specify name of the logfile
--wait=3 will cause wget to wait between download (to avoid server overload when downloading many files)
--random-wait will cause wget to "randomly" change wait value (from 0.5 to 1.5 * wait)
-U 'someString' wget will mask itself as some version of you favorite WWW browser (so called UserAgent string). You can visit (for example) http://whatsmyuseragent.com/ to get appropriate string for you version of Firefox, Opera, SeanMonkey etc.
Note: downloaded files will have very "ugly" and impractical name. You can batch rename them with Puppy built-in renamer (look at Menu, Filesystem).
I hope this post will be useful to some Puppy users. And while I already have sufficient solution, I would still appreciate supplementary explanation from some more knowledgeable user: Why parametr ‘--restrict-file-names=unix’ does not solve the problem as I would expect? Explanation is in next two posts.