Class WebEngine
java.lang.Object
com.biglybt.core.metasearch.impl.EngineImpl
com.biglybt.core.metasearch.impl.web.WebEngine
- All Implemented Interfaces:
Engine
- Direct Known Subclasses:
JSONEngine, RegexEngine, RSSEngine
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprivate Stringprivate static final booleanprivate booleanprivate Stringprivate static final Patternprivate static final Patternprivate DateParserprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate FieldMapping[]private static final booleanprivate booleanprivate String[]private Stringprivate static final Patternprivate static intprivate Stringprivate Stringprivate StringFields inherited from class EngineImpl
LD_AUTO_DL_SUPPORTED, LD_COOKIES, LD_CREATED_BY_ME, LD_ETAG, LD_LAST_MODIFIED, LD_LAST_UPDATE_CHECK, LD_LINK_IS_TORRENT, LD_UPDATE_CHECK_SECSFields inherited from interface Engine
AUTO_DL_SUPPORTED_NO, AUTO_DL_SUPPORTED_UNKNOWN, AUTO_DL_SUPPORTED_YES, AZ_VERSION, CT_AUDIO, CT_GAME, CT_VIDEO, ENGINE_SOURCE_LOCAL, ENGINE_SOURCE_RSS, ENGINE_SOURCE_STRS, ENGINE_SOURCE_UNKNOWN, ENGINE_SOURCE_VUZE, ENGINE_TYPE_JSON, ENGINE_TYPE_PLUGIN, ENGINE_TYPE_REGEX, ENGINE_TYPE_RSS, ENGINE_TYPE_STRS, FIELD_ASSET_DATE, FIELD_CATEGORY, FIELD_CDPLINK, FIELD_COMMENTS, FIELD_CONTENT_TYPE, FIELD_DATE, FIELD_DISCARD, FIELD_DOWNLOADBTNLINK, FIELD_DRMKEY, FIELD_HASH, FIELD_IDS, FIELD_NAME, FIELD_NAMES, FIELD_PEERS, FIELD_PLAYLINK, FIELD_PRIVATE, FIELD_RANK, FIELD_SEEDS, FIELD_SIZE, FIELD_SUPERSEEDS, FIELD_TORRENTLINK, FIELD_VOTES, FIELD_VOTES_DOWN, SC_BATCH_PERIOD, SC_FORCE_FULL, SC_REMOVE_DUP_HASH, SC_SOURCE, SEL_STATE_AUTO_SELECTED, SEL_STATE_DESELECTED, SEL_STATE_FORCE_DESELECTED, SEL_STATE_MANUAL_SELECTED, SEL_STATE_STRINGS, VUZE_FILE_COMPONENT_ENGINE_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionWebEngine(MetaSearchImpl meta_search, int type, long id, long last_updated, float rank_bias, String name, String searchURLFormat, String timeZone, boolean automaticDateParser, String userDateFormat, FieldMapping[] mappings, boolean needs_auth, String auth_method, String login_url, String[] required_cookies) protectedWebEngine(MetaSearchImpl meta_search, int type, long id, long last_updated, float rank_bias, String name, JSONObject map) protectedWebEngine(MetaSearchImpl meta_search, Map map) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexportToBencodedMap(Map map, boolean generic) protected voidprotected Stringprotected StringgetClone()protected DateParsergetIcon()protected FieldMapping[]String[]protected StringgetSearchUrl(boolean raw) getString(boolean full) protected WebEngine.pageDetailsgetWebPageContent(SearchParameter[] searchParameters, Map<String, String> searchContext, String headers, boolean only_if_modified) protected WebEngine.pageDetailsgetWebPageContent(SearchParameter[] searchParameters, Map<String, String> searchContext, String headers, boolean only_if_modified, WebEngine.pageDetailsVerifier verifier) private WebEngine.pageDetailsgetWebPageContentSupport(Proxy proxy, String proxy_host, String searchURL, SearchParameter[] searchParameters, Map<String, String> searchContext, String headers, boolean only_if_modified) protected voidinit()booleanbooleanbooleanbooleanbooleanvoidsetCookies(String cookies) protected voidsetHeaders(ResourceDownloader rd, String encoded_headers) voidsetLoginPageUrl(String loginPageUrl) protected voidsetNeedsAuth(boolean b) voidsetRequiredCookies(String[] requiredCookies) voidsetSearchUrl(String str) booleansupportsContext(String context_key) booleansupportsField(int field_id) Methods inherited from class EngineImpl
addPotentialAssociation, allocateUID, applyRankBias, checkSelectionStateRecorded, configDirty, debugLog, debugStart, delete, exportBEncodedMappings, exportJSONMappings, exportToJSONString, exportToVuzeFile, exportToVuzeFile, exportToVuzeFile, getAutoDownloadSupported, getAZVersion, getDebugFile, getId, getLastUpdateCheck, getLastUpdated, getLocalBoolean, getLocalLong, getLocalString, getMetaSearch, getName, getPreferredWeighting, getRankBias, getSelectionState, getSource, getSubscription, getType, getUID, getUpdateCheckSecs, getUpdateURL, getUserData, getVersion, importBEncodedMappings, importFromBEncodedMap, importFromJSONString, importJSONMappings, isActive, isMine, isPublic, log, log, mapResults, recordSelectionState, reset, sameLogicAs, search, searchAndMap, searchSupport, setDefaultUpdateCheckSecs, setId, setLastUpdateCheck, setLocalBoolean, setLocalLong, setLocalString, setLocalUpdateCheckSecs, setMine, setName, setPreferredDelta, setPublic, setRankBias, setSelectionState, setSource, setUID, setUpdateURL, setUserData, setVersion, vuzeFieldToID, vuzeIDToFieldMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Engine
exportToBencodedMap, exportToBencodedMap
-
Field Details
-
AM_TRANSPARENT
- See Also:
-
AM_PROXY
- See Also:
-
NEEDS_AUTH_DEFAULT
private static final boolean NEEDS_AUTH_DEFAULT- See Also:
-
AUTOMATIC_DATE_PARSER_DEFAULT
private static final boolean AUTOMATIC_DATE_PARSER_DEFAULT- See Also:
-
baseTagPattern
-
rootURLPattern
-
baseURLPattern
-
search_timeout_secs
private static int search_timeout_secs -
searchURLFormat
-
timeZone
-
automaticDateParser
private boolean automaticDateParser -
userDateFormat
-
downloadLinkCSS
-
mappings
-
rootPage
-
basePage
-
dateParser
-
needsAuth
private boolean needsAuth -
authMethod
-
loginPageUrl
-
iconUrl
-
requiredCookies
-
fullCookies
-
local_cookies
-
-
Constructor Details
-
WebEngine
public WebEngine(MetaSearchImpl meta_search, int type, long id, long last_updated, float rank_bias, String name, String searchURLFormat, String timeZone, boolean automaticDateParser, String userDateFormat, FieldMapping[] mappings, boolean needs_auth, String auth_method, String login_url, String[] required_cookies) -
WebEngine
- Throws:
IOException
-
WebEngine
protected WebEngine(MetaSearchImpl meta_search, int type, long id, long last_updated, float rank_bias, String name, JSONObject map) throws IOException - Throws:
IOException
-
-
Method Details
-
exportToBencodedMap
- Overrides:
exportToBencodedMapin classEngineImpl- Throws:
IOException
-
exportToJSONObject
- Overrides:
exportToJSONObjectin classEngineImpl- Throws:
IOException
-
getClone
-
init
protected void init() -
getNameEx
-
getReferer
-
supportsContext
-
isAnonymous
public boolean isAnonymous() -
getWebPageContent
protected WebEngine.pageDetails getWebPageContent(SearchParameter[] searchParameters, Map<String, String> searchContext, String headers, boolean only_if_modified) throws SearchException- Throws:
SearchException
-
getWebPageContent
protected WebEngine.pageDetails getWebPageContent(SearchParameter[] searchParameters, Map<String, String> searchContext, String headers, boolean only_if_modified, WebEngine.pageDetailsVerifier verifier) throws SearchException- Throws:
SearchException
-
getWebPageContentSupport
private WebEngine.pageDetails getWebPageContentSupport(Proxy proxy, String proxy_host, String searchURL, SearchParameter[] searchParameters, Map<String, String> searchContext, String headers, boolean only_if_modified) throws SearchException- Throws:
SearchException
-
extractProperty
-
setHeaders
-
getIcon
-
getMappings
-
supportsField
public boolean supportsField(int field_id) -
getRootPage
-
getBasePage
-
getDateParser
-
getDownloadLinkCSS
-
requiresLogin
public boolean requiresLogin() -
setCookies
-
getSearchUrl
-
getSearchUrl
-
setSearchUrl
-
getLoginPageUrl
-
setLoginPageUrl
-
getRequiredCookies
-
setRequiredCookies
-
isNeedsAuth
public boolean isNeedsAuth() -
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticatedin interfaceEngine- Overrides:
isAuthenticatedin classEngineImpl
-
setNeedsAuth
protected void setNeedsAuth(boolean b) -
getAuthMethod
-
getCookies
-
getString
- Specified by:
getStringin interfaceEngine- Overrides:
getStringin classEngineImpl
-
getString
- Overrides:
getStringin classEngineImpl
-