Package eu.hobbydev.bracheus.actions
Klasse SearchAction
java.lang.Object
eu.hobbydev.bracheus.actions.SearchAction
- Alle implementierten Schnittstellen:
Actions,HumanizerTools
- Bekannte direkte Unterklassen:
UpdateUserAction
Represents an action that performs a search operation on Instagram.
The action attempts to search for a user profile by navigating through the platform's UI,
utilizing both elements like the profile span and the search input field. If any element is not found,
the class attempts a direct search and handles login actions if necessary.
This class implements the `Actions` interface, which likely defines the `handleAction()` method
to perform the action when invoked. It also implements the `HumanizerTools` interface, which
may provide additional utility methods for simulating human-like interactions (e.g., adding delays).
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungSearchAction(String user) Constructs a SearchAction with the specified username to search for. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected voidPlaceholder method for performing a direct search if elements cannot be found.getName()Gets the name of this action, used for logging and identification purposes.voidExecutes the search action by performing a sequence of steps: - Checks if the profile span is present to ensure the user is logged inVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden eu.hobbydev.bracheus.utils.HumanizerTools
checkingActionQueue, inputDelay, siteDelay
-
Konstruktordetails
-
SearchAction
Constructs a SearchAction with the specified username to search for.- Parameter:
user- the username to search for on Instagram
-
-
Methodendetails
-
handleAction
public void handleAction()Executes the search action by performing a sequence of steps: - Checks if the profile span is present to ensure the user is logged in. - If not, attempts to log in by registering a LoginAction. - Starts the search process either via the search span or by performing a direct search. This method handles errors by retrying or invoking alternative methods if elements are not found.- Angegeben von:
handleActionin SchnittstelleActions
-
directSearch
protected void directSearch()Placeholder method for performing a direct search if elements cannot be found. This method currently does not implement any specific functionality but can be extended. -
getName
Gets the name of this action, used for logging and identification purposes.
-