author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Tue, 21 Sep 2010 00:08:51 +0300 | |
changeset 531 | 52ec271a920a |
parent 503 | 5248a845f4ac |
permissions | -rw-r--r-- |
394 | 1 |
-*- mode: outline; coding: utf-8 -*- |
2 |
||
503
5248a845f4ac
Recursive site download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
394
diff
changeset
|
3 |
* Recursive site download. |
5248a845f4ac
Recursive site download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
394
diff
changeset
|
4 |
|
5248a845f4ac
Recursive site download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
394
diff
changeset
|
5 |
$ wget -r -np -nc -e robots=off -p -k TOP-LEVEL-URL |
5248a845f4ac
Recursive site download.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
394
diff
changeset
|
6 |
|
394 | 7 |
* Get server response header. |
8 |
||
9 |
$ wget --server-response http://example.com |
|
10 |
$ wget -S http://example.com # short variant |
|
11 |
||
12 |
* View cookies from site. |
|
13 |
||
14 |
$ wget --save-cookies FILE -O - http://google.com >/dev/null |
|
15 |
||
16 |
* Send cookies to site. |
|
17 |
||
18 |
$ wget --load-cookies FILE http://google.com |
|
19 |
||
20 |
* Send specific header line. |
|
21 |
||
22 |
$ wget --header='Accept-Charset: iso-8859-2' --header='Accept-Language: hr' http://fly.srk.fer.hr/ |
|
23 |
||
24 |
* Send POST request. |
|
25 |
||
26 |
Log in to the server. This can be done only once. |
|
27 |
||
28 |
$ wget --save-cookies cookies.txt --post-data 'user=foo&password=bar' http://server.com/auth.php |
|
29 |
||
30 |
Now grab the page or pages we care about. |
|
31 |
||
32 |
$ wget --load-cookies cookies.txt -p http://server.com/interesting/article.php |