LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-16-2010, 05:36 AM   #1
jj3286
LQ Newbie
 
Registered: Oct 2010
Posts: 1

Rep: Reputation: 0
404 error when using wget to download pdf -- related to Save File popup


Hello:
I have a link to a pdf file, and I want to use wget (or python) to download the file. If I type the address into Firefox, a dialog box pops up asking if I want to open or save the pdf file. If I give the same address to wget, I receive a 404 error. The wget result is below. Can anyone suggest how to use wget to save this file? Thanks.

wget http://dynamodata.fdncenter.org/990s...&rt=990EZ&t9=A
[1] 4619
[2] 4620
[3] 4621
[2]- Done yr=200812

nebm@nebm:~$ --2010-10-16 03:33:15-- http://dynamodata.fdncenter.org/990s...?ein=850475649
Resolving dynamodata.fdncenter.org... 206.17.146.54
Connecting to dynamodata.fdncenter.org|206.17.146.54|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://tfcny.fdncenter.org/990_pdf_a...50475649__.pdf [following]
--2010-10-16 03:33:16-- http://tfcny.fdncenter.org/990_pdf_a...50475649__.pdf
Resolving tfcny.fdncenter.org... 12.39.246.83
Connecting to tfcny.fdncenter.org|12.39.246.83|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2010-10-16 03:33:16 ERROR 404: Not Found.

[1] Exit 8 wget http://dynamodata.fdncenter.org/990s...?ein=850475649
[2]- Done yr=200812
[3]+ Done rt=990EZ

Last edited by jj3286; 10-16-2010 at 05:38 AM. Reason: missing some text
 
Old 10-16-2010, 06:42 AM   #2
adolfo.pa
LQ Newbie
 
Registered: Oct 2010
Posts: 1

Rep: Reputation: Disabled
Hi,

The problem is the '&' characters embedded in the URL. The ampersand is a special shell character used to execute a command in the background.

To make things work as you expect, you'll have to quote the URL:

wget "THE URL"

Both single and double quotes will work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wget proxy error 404 cannedman Linux - Newbie 1 08-24-2009 05:08 PM
How to wget a webpage, and save as PDF (like cups-pdf) ? frenchn00b Programming 3 11-18-2008 03:48 PM
wget fail to download pdf files powah Linux - Software 2 05-04-2006 03:38 PM
download/save a site- wget kpachopoulos Linux - Software 1 07-26-2005 12:22 PM
wget 404 error BarryM45 Linux - General 2 10-12-2004 05:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration