1 |
adcroft |
1.1 |
# ----- Example 7 - Spider using "http" method ------- |
2 |
|
|
# |
3 |
|
|
# Please see the swish-e documentation for |
4 |
|
|
# information on configuration directives. |
5 |
|
|
# Documentation is included with the swish-e |
6 |
|
|
# distribution, and also can be found on-line |
7 |
|
|
# at http://swish-e.org |
8 |
|
|
# |
9 |
|
|
# |
10 |
|
|
# This example demonstrates how to use the |
11 |
|
|
# the "http" method of spidering. |
12 |
|
|
# |
13 |
|
|
# Indexing (spidering) is started with the following |
14 |
|
|
# command issued from the "conf" directory: |
15 |
|
|
# |
16 |
|
|
# swish-e -S http -c example7.config |
17 |
|
|
# |
18 |
|
|
# Note: You should have the current Bundle::LWP bundle |
19 |
|
|
# of perl modules installed. This was tested with: |
20 |
|
|
# libwww-perl-5.53 |
21 |
|
|
# |
22 |
|
|
# ** Do not spider a web server without permission ** |
23 |
|
|
# |
24 |
|
|
#--------------------------------------------------- |
25 |
|
|
|
26 |
|
|
# Include our site-wide configuration settings: |
27 |
|
|
|
28 |
|
|
IncludeConfigFile example4.config |
29 |
|
|
|
30 |
|
|
# Specify the URL (or URLs) to index: |
31 |
|
|
IndexDir http://swish-e.org |
32 |
|
|
|
33 |
|
|
|
34 |
|
|
# If a server goes by more than one name you can use this directive: |
35 |
|
|
|
36 |
|
|
EquivalentServer http://swish-e.org http://www.swish-e.org |
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
# This defines how many links the spider should |
41 |
|
|
# follow before stopping. A value of 0 configures the spider to |
42 |
|
|
# traverse all links. The default is 5 |
43 |
|
|
# The idea is to limit spidering, but seems of questionable use |
44 |
|
|
# since depth may not be related to anything useful. |
45 |
|
|
|
46 |
|
|
MaxDepth 10 |
47 |
|
|
|
48 |
|
|
# The number of seconds to wait between issuing |
49 |
|
|
# requests to a server. The default is 60 seconds. |
50 |
|
|
|
51 |
|
|
Delay 1 |
52 |
|
|
|
53 |
|
|
|
54 |
|
|
# (default /var/tmp) The location of a writeable temp directory |
55 |
|
|
# on your system. The HTTP access method tells the Perl helper to place |
56 |
|
|
# its files there. The default is defined in src/config.h and depends on |
57 |
|
|
# the current OS. |
58 |
|
|
|
59 |
|
|
TmpDir . |
60 |
|
|
|
61 |
|
|
|
62 |
|
|
# The "http" method uses a perl helper program to fetch each document |
63 |
|
|
# from the web called "swishspider" and is included in the src directory of |
64 |
|
|
# the swish-e distribution. |
65 |
|
|
SpiderDirectory ../src |
66 |
|
|
|
67 |
|
|
|
68 |
|
|
# end of example |