-
Notifications
You must be signed in to change notification settings - Fork 337
Miscellaneous Functions
Function: info(topic: str, lines: int = 3) -> None
This function is used to get the details of a topic using the Wikipedia API. The lines parameter can be used to specify the number of lines to fetch.
Example: pywhatkit.info("Python Language", 10)
Function: playonyt(topic: str, use_api: bool = False) -> str
This function is used to play the most relevant YouTube Video associated with a Topic. If you are facing issues with this function like malformed URL's you can set the use_api parameter to be True, this uses the PyWhatKit playonyt API to fetch the Video URL.
Example: pywhatkit.playontyt("Python", use_api = True) (if you want to use the API)
Function: search(topic: str) -> None
This function is used to search google for a specific topic and then open's a new browser to the search result page.
Function: showHistory() -> None
This function shows the history of all the messages that have been sent using this library.
Function: take_screenshot(file_name: str = 'pywhatkit_screenshot') -> None
This function is used to take a screenshot, you can change the name of the output file. The saved file will be PNG.
Example: pywhatkit.take_screenshot("myscreenshot")
PyWhatKit Version 5.2