I am creating a bot that gets all the free items available on the item catalog, I want the person using the bot to just put their roblox cookie into a .txt file, how would I log in with the cookie in python?
If you're using requests
, then you're most likely using requests.Session()
. You can simply use session.cookies
Code example:
import requests as r
cookie = "" # cookie goes here (accessed via text file)
requestSession = r.Session() # initiate a session
requestSession.cookies[".ROBLOSECURITY"] = cookie
Then you can make a request using the Session
and it will include the ROBLOSECURITY in the headers.