Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: download a file from a secure website


From   Andrew Dyck <andrew@andrewdyck.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: download a file from a secure website
Date   Fri, 4 Feb 2011 11:20:08 -0800

I have not tried this from within stata but I've used wget to download
data from password protected sites using wget's --http-user=USER and
--http-passwd=PASS options.

If you have wget (and the other unixutils) installed, try looking at
the wget help file for more info by typing:

wget --help

in the windows terminal. There is a lot there that I didn't go over in my post.

Also, as the Stata blog pointed out, it's probably best to use
commands native to Stata where possible (-copy-, -unzipfile-) rather
than the method outlined in my post. But, to my knowledge Stata's
-copy- cannot be used with https as you've seen.

Cheers,
Andrew

On Fri, Feb 4, 2011 at 11:03 AM, Dimitriy V. Masterov
<dvmaster@gmail.com> wrote:
> Is there a way to download a file from a secure website using Stata?
>
> I tried copy "https://www.XYZ..."; data.txt, but that generates an
> unknown network protocol error.
>
> I also tried using wget as described here
> (http://www.andrewdyck.com/download-and-unzip-data-files-from-stata/),
> but that method appears to fail for any sort of website.
>
> I am using Stata 11.1 on 64-bit Windows 7. I use a proxy to access the
> internet.
>
> I am not doing anything shady if that is a concern.
>
> DVM
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index