Laur IVAN

Mirror a Website with WGet

Posted by in Software

TL;DR: if you want to mirror a site where you need to authenticate, you need to do it in two steps. In the process of testing my app, I needed a mirror of the website I’m using. Since the website has authentication (via a form), the mirroring process has 2 parts. First part is to log in and get the cookies:

Now, the cookies are saved in the cookies.txt file. Note that you need to specify –keep-session-cookies. Otherwise, the file will be empty. The second part is to actually…read more