1

i am trying to access eoddata.com to download a list of stock prices at the end of everyday without having to do it myself manually.

the full url i am trying to access would be something like: http://eoddata.com/data/filedownload.aspx?e=AMEX&sd=20160603&ed=20160603&d=9&k=ejv5n7btwb&o=d&ea=1&p=0

I have tried doing a curl request:

When using curl

curl username:[email protected]/data/filedownload.aspx?e=AMEX&sd=20160602&ed=20160602&d=9&k=mbywemcptq&o=d&ea=1&p=0

the return is:

[1] 5179
[2] 5180
[3] 5181
[4] 5182
[5] 5183
[6] 5184
[7] 5185
[2]   Done                    sd=20160602
[3]   Done                    ed=20160602
[4]   Done                    d=9
[5]   Done                    k=mbywemcptq
[6]-  Done                    o=d
[7]+  Done                    ea=1

with no file being downloaded. I am not sure what this means. will it not work because the url doesnt end in .txt or .zip?

i have tried adding http:// before the url and it says http host not found.

any help would be appreciated.

2
  • the site needs a password?
    – undo
    Jun 7, 2016 at 7:17
  • Your shell is treating the & special. (I suspect you're in Unix, and it is backgrounding the various pieces, and showing you PIDs.) Try simply surrounding your whole URL (everything after the word "curl") with quotation marks.
    – TOOGAM
    Jun 7, 2016 at 7:22

1 Answer 1

0

You need to quote the URL, as & has special meanings in the shell (it sends the command preceding it to the background).

curl -O "http://username:[email protected]/data/filedownload.aspx?e=AMEX&sd=20160602&ed=20160602&d=9&k=mbywemcptq&o=d&ea=1&p=0"
2
  • I have tried it with this addition just as youve alluded to. now a file downloads with the exact name (to be expected) yet under the curl request diagnostics, % Total ,% received, speed upload ... etc are all 0 and the file is empty.
    – charles l
    Jun 7, 2016 at 7:52
  • That sounds like a problem with the server and not curl. Perhaps your session has expired. Jun 7, 2016 at 8:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .