Skip to content

Miscellaneous Functions

Ankit Raj Mahapatra edited this page May 2, 2021 · 29 revisions

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")

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.

Clone this wiki locally