Skip to content

Commit

Permalink
fix: python examples
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed May 12, 2024
1 parent d9ec8da commit 0995543
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/python/cookiejar_example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rookiepy import chrome, to_cookiejar
from rookiepy import brave, to_cookiejar

cookies = chrome()
cookies = brave()
cj = to_cookiejar(cookies)
print(cj)
1 change: 0 additions & 1 deletion examples/python/custom_path.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import rookiepy
from pathlib import Path


# Using pathlib and cross platform paths is always recommended!
db_path = Path("C:/Users/User/AppData/Local/BraveSoftware/Brave-Browser/User Data/default/network/Cookies").resolve().absolute()
key_path = Path("C:/Users/User/AppData/Local/BraveSoftware/Brave-Browser/User Data/Local State").resolve().absolute() # optional
Expand Down
2 changes: 1 addition & 1 deletion examples/python/dict_example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from rookiepy import edge, to_dict
from rookiepy import edge

cookies = edge()
print(cookies)
2 changes: 1 addition & 1 deletion examples/python/requests_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def create_session() -> requests.Session:
Create requests session with cookiejar that contains web browsers cookies
"""
# Load cookies from browser
cookies = rookiepy.any_browser()
cookies = rookiepy.load()
# Create Cookiejar from cookies
cj = rookiepy.to_cookiejar(cookies)
# Create session
Expand Down

0 comments on commit 0995543

Please sign in to comment.