Skip to content

Basic Usage

ohashi edited this page Jan 31, 2022 · 4 revisions

Functions

Function Parameter Return Description
checkLink url isChapter (Boolean) Checks if the Chegg link is a chapter type or not.
question url, cookie, userAgent answer (String or Array) Gets question data from Chegg.
answer url, cookie, userAgent question (String or Array) Gets answer data from Chegg.

checkLink

Parameters - url : str

Returns - isChapter : Boolean

question

Parameters - url : str, cookie : str, userAgent : str

Returns - question : str

Note: Each image that is in the question will return the link of the image in placement of the actual image in the text from Chegg. Also, bolds are formatted with ** due to this library being mainly made for EinsteinBot, our Discord bot.

Return Examples

Normal Questions
Textbook Questions

answer

Parameters - url : str, cookie : str, userAgent : str

Returns - answer : str (if non-chapter type) or array (if chapter type, each step is one value in the array)

Note: Each image that is in the solution will return the link of the image in placement of the actual image in the text from Chegg. Also, bolds are formatted with ** due to this library being mainly made for EinsteinBot, our Discord bot.

Return Examples

Normal Answers
Textbook Answers
    Each step is one value in the array.
Clone this wiki locally