public class MultiRegexRetryPolicy extends StandardRetryPolicy
Modifier and Type | Field and Description |
---|---|
(package private) java.util.Set<com.screenscraper.util.retry.MultiRegexRetryPolicy.RegexConditionalPair> |
regularExpressions |
errorOutputMap, maxNumberOfRetries, resetReferrerBeforeRescrape, resetSessionVariablesBeforeRescrape, scrapingSession, scriptContext, theScrapeableFile
Constructor and Description |
---|
MultiRegexRetryPolicy()
Creates an empty retry policy that can test multiple regular expressions
|
Modifier and Type | Method and Description |
---|---|
void |
addRegex(java.lang.String regex,
boolean shouldMatch)
Adds a regular expression that should be used to test the validity of a page
|
boolean |
isError()
Checks to see if the page loaded incorrectly
|
duplicate, runOnAllAttemptsFailed, runOnError, setCheckWasErrorOnRequest, setEndScrapeOnFailure, setEndScrapeOnFailureCount, setEndScrapeOnScrapeableFileFailureCount, setExtractorsMustMatch, setRunOnFail, setScriptOnFail, setShouldFailPattern, setShouldMatchPattern, toString
getErrorChecksMap, getMaxRetryAttempts, getScriptContext, resetReferrerBeforeRescrape, resetSessionVariablesBeforeRescrape, setMaxNumberOfRetries, setResetReferrerBeforeRescrape, setResetSessionVariablesBeforeRescrape, setScrapeableFile, setScrapingSession, setScriptContext, shouldLogErrors
java.util.Set<com.screenscraper.util.retry.MultiRegexRetryPolicy.RegexConditionalPair> regularExpressions
public MultiRegexRetryPolicy()
public boolean isError() throws java.lang.Exception
RetryPolicy
isError
in interface RetryPolicy
isError
in class StandardRetryPolicy
java.lang.Exception
- If something goes wrong while executing this methodpublic void addRegex(@NotNull java.lang.String regex, boolean shouldMatch)
regex
- The regular expression to addshouldMatch
- True if it should match, false if it should not match