jeudi 8 janvier 2015

Multiple user credentials in wget


Using wget, is it possible to supply more than one user/password pair when mirroring a website that has multiple password-protected areas with different credentials?


I would like to mirror an entire website that has several protected areas. As a simplified example, consider the following structure:



http://ift.tt/1FpyDGW (user=alice, password=cat)
http://ift.tt/1FpyFhZ (user=bob, password=dog)


Now when using wget --mirror example.com, you can additionally supply the parameters --user and --password, but by supplying only one user/password pair, one of the two protected areas could not be downloaded due to 401 Authorization Required.


Is there a way to do something like wget --user=alice --password=cat --user=bob --password=dog (...)? In natural language: When encountering a password-protected area, try to gain access by trying all of the supplied credentials one after the other.



Aucun commentaire:

Enregistrer un commentaire