default.properties
上传用户:qing5858
上传日期:2015-10-27
资源大小:6056k
文件大小:8k
源码类别:

搜索引擎

开发平台:

Java

  1. # -----------------------------------------------------------------------------
  2. # Default Site Configuration File
  3. # -----------------------------------------------------------------------------
  4. #
  5. # $Id: default.properties,v 1.17 2003/04/09 17:07:59 vanrogu Exp $
  6. #
  7. # This is the default per-site configuration file. Each site for which no
  8. # configuration file is specified will default to this configuration.
  9. # By adding specific configuration files under this folder, you can configure
  10. # the behaviour of JSpider on a per-site basis.
  11. #
  12. # -----------------------------------------------------------------------------
  13. site.handle=true
  14. # -----------------------------------------------------------------------------
  15. # Proxy Configuration
  16. # -----------------------------------------------------------------------------
  17. #
  18. # Determines whether this site is to be accessed via the proxy server defined
  19. # in jspider.properties.
  20. #
  21. # PROPERTIES :
  22. #
  23. #  site.proxy.use
  24. #    whether the proxy settings defined in jspider.properties are applicable
  25. #    to this site.
  26. #    if 'true', the settings in jspider.properties are used.  if 'false', this
  27. #    site is treated as a local site, and accessed without going through the
  28. #    proxy server.
  29. #    if no proxy is configured in jspider.properties (jspider.proxy.use in that
  30. #    file is set to false), then this setting doesn't matter.
  31. #
  32. # -----------------------------------------------------------------------------
  33. site.proxy.use=true
  34. # -----------------------------------------------------------------------------
  35. # Throttling Configuration
  36. # -----------------------------------------------------------------------------
  37. #
  38. # Throttling allows you to keep the number of requests over a given time period
  39. # towards a specific server under control.
  40. # Without throttling, JSpider running on a fast machine with a speedy internet
  41. # connection would choke the target system with requests.  By configuring
  42. # throttling, you can tell JSpider how it should spread its requests to one
  43. # server.  By tweaking these settings, you can generate more or less traffic
  44. # on a server (to do scalability/load testing), or influence the usage pattern
  45. # of the site.
  46. # Please note that throttling influences only the maximum amount of requests to
  47. # be done towards a server in a given timeframe.  If your JSpider system is
  48. # heavily loaded, it is possible that these numbers aren't reached and that
  49. # throttling doesn't have to hold the parser threads for a while.
  50. # by default, a throttle implementation that forces a minimum amount of milli-
  51. # seconds between two subsequent requests to the same host is provided.
  52. #
  53. # PROPERTIES :
  54. #
  55. #  site.throttle.provider
  56. #   the class that implements the Provider interface via which the Throttle
  57. #   implementation is created.  This way, you can easily plug in your own
  58. #   throttle implementation.
  59. #   A few default implementations are provided, configuration of these
  60. #   is explained below:
  61. #
  62. # DISTRIBUTED LOAD THROTTLE (default)
  63. # -----------------------------------
  64. #
  65. # When using the distributed load throttle (the default throttle), a minimum
  66. # number of milliseconds between two subsequent requests to the same server
  67. # are enforced.
  68. #
  69. # PROPERTIES :
  70. #
  71. #  site.throttle.interval
  72. #    minimum number of milliseconds between two requests to the same server.
  73. #    when a request is to be made faster then allowed, the request is postponed
  74. #    until the next allowed timeframe.
  75. #
  76. # SIMULTANEOUS USERS THROTTLE
  77. # ---------------------------
  78. #
  79. # By enabling this throttle strategy, you can simulate load on a system by
  80. # different simultaneous users.
  81. # Each spider thread (configured in jspider.properties) will act as a simulated
  82. # user, and will be throttled on its own.  The 'thinking time' for each user
  83. # can be configured to simulate real system loads.
  84. # This throttle implementation can cause a much more diversed request pattern.
  85. # (Several requests at the same time, then no requests for a while, etc ...
  86. #
  87. # PROPERTIES :
  88. #
  89. #  site.throttle.thinktime.min
  90. #    minimum number of milliseconds between two requests from the same
  91. #    simulated user (spider thread).
  92. #
  93. #  site.throttle.thinktime.max
  94. #    maximum number of milliseconds between two requests from the same
  95. #    simulated user (spider thread).
  96. #
  97. # -----------------------------------------------------------------------------
  98. # --- COMMENT OUT TO USE OTHER THROTTLE IMPLEMENTATION ------------------------
  99. site.throttle.provider=net.javacoding.jspider.core.throttle.impl.DistributedLoadThrottleProvider
  100. site.throttle.config.interval=1000
  101. # --- UNCOMMENT TO USE SIMULTANEOUS USERS SIMULATION --------------------------
  102. #site.throttle.provider=net.javacoding.jspider.core.throttle.impl.SimultaneousUsersThrottleProvider
  103. #site.throttle.config.thinktime.min=2000
  104. #site.throttle.config.thinktime.max=5000
  105. # -----------------------------------------------------------------------------
  106. # Cookie Configuration
  107. # -----------------------------------------------------------------------------
  108. #
  109. # Configures the cookie usage for the sites that are given this configuration
  110. #
  111. # PROPERTIES :
  112. #
  113. #  site.cookies.use
  114. #    whether cookies should be accepted and sent back to the site (true/false)
  115. #
  116. # -----------------------------------------------------------------------------
  117. site.cookies.use=true
  118. # -----------------------------------------------------------------------------
  119. # Robots.txt configuration
  120. # -----------------------------------------------------------------------------
  121. #
  122. # Configures the handling of the robots.txt file on this site
  123. #
  124. # PROPERTIES :
  125. #
  126. #  site.robotstxt.fetch
  127. #    whether the spider should fetch the robots.txt file
  128. #
  129. #  site.robotstxt.obey
  130. #    whether the spider should obey the robots.txt file
  131. #
  132. # -----------------------------------------------------------------------------
  133. site.robotstxt.fetch=true
  134. site.robotstxt.obey=true
  135. # -----------------------------------------------------------------------------
  136. # User Agent Configuration
  137. # -----------------------------------------------------------------------------
  138. #
  139. # This configuration controls the User Agent that is used by JSpider.
  140. # If specified here, it overrides the default specified in the global
  141. # configuration (jspider.properties).
  142. # This way, it is possible to assign another user agent for some sites.
  143. #
  144. # PROPERTIES :
  145. #
  146. #  site.userAgent
  147. #    the User-Agent that JSpider will send along with each HTTP request.
  148. #
  149. # -----------------------------------------------------------------------------
  150. #site.userAgent=JSpider (http://j-spider.sourceforge.net)
  151. # -----------------------------------------------------------------------------
  152. # Rules Configuration
  153. # -----------------------------------------------------------------------------
  154. #
  155. # Tells the system what rules to apply upon encountered URLs from this site.
  156. #
  157. # PROPERTIES:
  158. #
  159. #  site.rules.spider.count
  160. #    The number of rules that will be applied on all URLs before being taken
  161. #    into account for spidering (fetching)
  162. #
  163. #  site.rules.spider.[number]
  164. #    the name of the class that provides the rule implementation by which the
  165. #    urls should be handled
  166. #
  167. #  site.rules.parser.count
  168. #    The number of rules that will be applied on all URLs before being taken
  169. #    into account for parsing
  170. #
  171. #  site.rules.parser.[number]
  172. #    the name of the class that provides the rule implementation by which the
  173. #    urls should be handled
  174. #
  175. # -----------------------------------------------------------------------------
  176. site.rules.spider.count=2
  177. site.rules.spider.1.class=net.javacoding.jspider.mod.rule.InternallyReferencedOnlyRule
  178. site.rules.spider.2.class=net.javacoding.jspider.mod.rule.ForbiddenPathRule
  179. site.rules.spider.2.config.path=/content/javadoc
  180. site.rules.parser.count=1
  181. site.rules.parser.1.class=net.javacoding.jspider.mod.rule.BaseSiteOnlyRule