Other Functions

You can use basic functions which selenium provides with this library like opening a url, get pagesource, get current url etc. These are the functions:-

Open

It will open the url provided in the argument.

youtube.open(url)
Parameters

url (str) – Link which need to be opened

Returns

{}

Return type

dict

Get Page Title

It returns the title of page opened.

youtube.get_page_title()
Returns

{“pagetitle”:”youtube”}

Return type

dict

Get Page Source

It returns the pagesource of page opened.

youtube.get_page_source()
Returns

{“pagesource”:”pagesource”}

Return type

dict

Get Current Url

It returns the pagesource of page opened.

youtube.get_current_url()
Returns

{“url”:”url”}

Return type

dict

Reload

It reloads the page opened.

youtube.reload()
Returns

{}

Return type

dict

Keypress

It perform the keypress passed.

youtube.keypress(key)
Parameters

key (str) – Key which need to be pressed, e.g pagedown,arrowleft,enter

Returns

{}

Return type

dict

Scroll

It scrolls to the end of page.

youtube.scroll()
Returns

{}

Return type

dict

End

It ends the youtube session and close the automated chromedriver.

Note

You will need to create youtube object again after end().

youtube.end()
Returns

{}

Return type

dict

Quit

It quits the bot-studio application runing in background.

Note

You will need to import bot-studio library again to start application.

youtube.quit()
Returns

{}

Return type

dict