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

Conversation

GrrGrrMan
Copy link

@GrrGrrMan GrrGrrMan commented Oct 31, 2024

Made the cookie path set to in the parent of the script ("cookies.txt"). More user-friendly setup instructions

Summary by Sourcery

Fix the cookie fetching mechanism by setting the path to the parent directory of the script and update the README with improved setup instructions.

Bug Fixes:

  • Fix the cookie fetching mechanism by setting the path to the parent directory of the script.

Documentation:

  • Update the README with more user-friendly setup instructions, including a section on how to manually place the Roblox cookie in 'cookie.txt' and a link to a tutorial video.

Copy link

sourcery-ai bot commented Oct 31, 2024

Reviewer's Guide by Sourcery

This PR improves the cookie handling functionality by using a more robust file path resolution and enhances the README with detailed setup instructions. The changes focus on making the cookie file path relative to the script's location and providing better user guidance.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Improved cookie file path handling
  • Added path resolution relative to script location using pathlib
  • Added error handling for missing cookie file
  • Improved code organization with better spacing
main.py
Enhanced documentation with detailed setup instructions
  • Added cookie setup instructions section
  • Included video tutorial reference for cookie retrieval
  • Added execution time expectations and rate limit information
  • Improved README structure with new sections
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @GrrGrrMan - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Please add security warnings to the README about safely storing and protecting the cookie.txt file, as it contains sensitive authentication credentials. Consider also reviewing the safety of the linked cookie tutorial.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 2 issues found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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}")

[![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.

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant