Thread: wget download specific links
hello,
using wget download pdf files. however, seems there problem. using following code:
the ilist.txt contains address of pages contain pdf files. links in ilist.txt following:code:while read -r link http_strip="${link##*/}" output="${http_strip%%.pdf*}".pdf wget -nc --no-parent -c "$link" -o "$output" done < <(grep \.pdf ./ilist.txt)
i trying download pdf file embedded in above webpage. direct link file follows:code:http://amazon.com/shelf/145.12/book.58616/pdf
and want save above file "58616_ftp.pdf".code:http://amazon.com/shelf/145.12/book.58616/check/58616_ftp.pdf?s=1&k=hg4523nx&440f11f6
have links in ilist.txt , not direct links, why using links in ilist.txt , not direct links.
however, after running above code sample page, "pdf.pdf" file saved corrupted file (the size 12k , can not open it).
so, problem is, not save actual file, , second problem filename "pdf.pdf", should "58616_ftp.pdf".
please let me know if have suggestions.
using cygwin on windows.
thank help.
Forum The Ubuntu Forum Community Other Discussion and Support Other OS Support and Projects Other Operating Systems Any Other OS wget download specific links
Ubuntu
Comments
Post a Comment