Using wget to fetch password protected website (trac wiki page)

Solution 1:

I think you are very close to the solution. This should work depending on your configuration:

wget --no-check-certificate --user viroos --password myPassword \
     --save-cookies=cookies --keep-session-cookies \
     https://someserver.com/trac/xxx/login

wget --no-check-certificate --load-cookies=cookies \
     https://someserver.com/trac/xxx/timeline?ticket=on&changeset=on&milestone=on&wiki=on&blog=on&max=50&daysback=90&format=rss

First call does the authorization on /login url and saves the auth cookie. The second call should get what you want.

This will work if you have basic autohrization enabled on ..../trac/login url.

Solution 2:

The --user/--password flags in wget, for http URLs, cover HTTP basic authentication. Trac has its own login mechanism, so these flags won't work in this case.

There is a way to do what you want, (although I'm not sure wget is capable of doing it), but before spending time on that direction, did you consider using the TRAC timeline RSS feed?

The RSS feed will allow you to subscribe to the timeline changes, using your favorite RSS reader, and be notified of them. It will also give you a standard XML file for easy parsing, so you'll be able to do what you want with the data.