$get cookie

From UBot Studio
Jump to: navigation, search

This function is a Cookie Control function in the UBot Extended Library found in the bot bank. This function will return the value of a specified cookie.

Name: Refers to the name of the cookie who's value is being retrieved.

The cookies are returned in the following format:

Cookie Value1


Example

navigate("http://www.html-kit.com/tools/cookietester/","Wait")


For this example, the website allows the setting of cookies through the web page.

Clicking the Set Test Cookie button on the web page sets a random cookie.



set(#my cookie,$get cookie("TestCookie_Name_201510161228"),"Global")


The get cookie function is given the name of the cookie with the value being sought. The cookie name can come from a scraped value, variable, a table item, or a list item.

Once the set command is run, the value of the specified cookie is set to the variable #mycookie.

Keep in mind that each time the Set Cookies Test button on the web page is clicked, a new random cookie is generated.


Getcookies.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox