Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Cookie fetching, and updated readme #6

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@ automatically buy all free accessories on roblox
```bash
pip install -r requirements.txt
```
## Cookies
You need to manually place your roblox cookie in cookie.txt, watch a video of how to get your roblox cookies if you don't know how.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (documentation): Add security warning about cookie handling

Consider adding a warning about the security implications of sharing or exposing cookies, and mention that users should never share their cookies with others.

Suggested change
You need to manually place your roblox cookie in cookie.txt, watch a video of how to get your roblox cookies if you don't know how.
## Cookies
⚠️ SECURITY WARNING: Your Roblox cookie provides full access to your account. Never share it with anyone or commit it to public repositories.
Place your Roblox cookie in cookie.txt. If you need help obtaining your cookie, follow an official guide or trusted tutorial.



[![Roblox Cookies tutorial](https://img.youtube.com/vi/tuXr8O9nxkQ/0.jpg)](https://www.youtube.com/watch?v=tuXr8O9nxkQ)

## Be patient and enjoy
This script will take a bit to buy all the free itmes on roblox as rate limiters exists so expect it to finish in an hour at minimum if you want to buy all the items.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (documentation): Fix typo and improve punctuation

Change 'itmes' to 'items' and consider rephrasing to: 'This script will take a bit to buy all the free items on Roblox, as rate limiters exist. Expect it to finish in an hour at minimum if you want to buy all the items.'

Suggested change
This script will take a bit to buy all the free itmes on roblox as rate limiters exists so expect it to finish in an hour at minimum if you want to buy all the items.
This script will take a bit to buy all the free items on Roblox, as rate limiters exist. Expect it to finish in an hour at minimum if you want to buy all the items.


# Console Showcase
![](https://i.imgur.com/o8yeFpS.png)

![](https://i.imgur.com/o8yeFpS.png)
1 change: 1 addition & 0 deletions cookie.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

11 changes: 9 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@


import pathlib
import time

import requests
from rich.console import Console

cookie = pathlib.Path("cookie.txt").read_text().strip()
# Specify the path to the parent directory
cookie_path = pathlib.Path(__file__).parent / "cookie.txt"

if not cookie_path.exists():
raise FileNotFoundError("cookie.txt file not found in the parent directory. Please ensure it's there.")

cookie = cookie_path.read_text().strip()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider handling potential IOError/OSError exceptions when reading the cookie file

While FileNotFoundError is handled, other IO-related errors could occur. Consider catching IOError/OSError and providing a more specific error message that includes the full path.

Suggested change
cookie = cookie_path.read_text().strip()
try:
cookie = cookie_path.read_text().strip()
except OSError as e:
raise OSError(f"Failed to read cookie file at {cookie_path}: {e}")


session = requests.Session()
session.cookies.update({".ROBLOSECURITY": cookie})
Expand Down