Skip to main content

Thread: wget download specific links


hello,

using wget download pdf files. however, seems there problem. using following code:
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)
the ilist.txt contains address of pages contain pdf files. links in ilist.txt following:
code:
http://amazon.com/shelf/145.12/book.58616/pdf
i trying download pdf file embedded in above webpage. direct link file follows:
code:
http://amazon.com/shelf/145.12/book.58616/check/58616_ftp.pdf?s=1&k=hg4523nx&440f11f6
and want save above file "58616_ftp.pdf".

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

Popular posts from this blog

Some mp4 files not displaying correctly (CS6)

Thread: Samba is not authenticating with LDAP