Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Download data behind a login

    Dear Statalist,

    How do I download and excel data from a website that requires log in. I have the user name and the password

    Regards,
    Christian

  • #2
    I dont know of any way to do this from Stata's built-in commands (like -webuse-, -copy-) but in the past I've tinkered with shelling out to command line utilities (like 'wget' or 'curl') for this purpose. The discussion linked below includes some helpful tips, but I find that websites with different login parameters/setups require a lot of tinkering with the options to get it right.
    (Also, I have used this method to help with repeatedly logging into the same account across time from the same machine, downloading data, and then opening it in Stata; but I'm guessing that if you wanted to log into multiple accounts with this method then there'd be additional complications with the cookies options that arent covered in the thread linked below.)
    https://stackoverflow.com/questions/...page-with-wget
    Eric A. Booth | Senior Director of Research | Far Harbor | Austin TX

    Comment


    • #3
      One possible solution to a very narrow problem: if the download is accessible via FTP, one may try with the URL in the following format.

      Code:
      ftp://username:password@server:portnumber/path/to/your/file
      Though, I don't have the ability to test whether this will work.

      Comment

      Working...
      X