Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getCrawlDelay (0.09 sec)

  1. fess-crawler/src/main/java/org/codelibs/fess/crawler/entity/RobotsTxt.java

                return true;
            }
            return directive.allows(path);
        }
    
        public int getCrawlDelay(final String userAgent) {
            final Directive directive = getMatchedDirective(userAgent);
            if (directive == null) {
                return 0;
            }
            return directive.getCrawlDelay();
        }
    
        public Directive getMatchedDirective(final String userAgent) {
            final String target;
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  2. fess-crawler/src/test/java/org/codelibs/fess/crawler/helper/RobotsTxtHelperTest.java

                assertTrue(robotsTxt.allows("/foo/bar/", userAgent));
                assertTrue(robotsTxt.allows("/foo/bar/index.html", userAgent));
                assertEquals(0, robotsTxt.getCrawlDelay(userAgent));
            }
    
            for (String userAgent : new String[] { "BruteBot", "FOO BruteBot/1.0" }) {
                assertFalse(robotsTxt.allows("/aaa", userAgent));
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top