Comments (10)
rookiepy.firefox(['google.com'])
returns an unusually high number of cookies.
Resolved in v0.2.6. Perfect! Thank you!
from rookie.
Thanks.
I'm working on adding session cookies to rookie in firefox
as well.
in the meanwhile, if it's possible for you to check again the length with little modification in browser_cookie3
it would be great.
- Navigate to the browser_cookie3 folder (just click some function in your
ide
it should go there) - and then change here:
browser_cookie3/__init__.py
LINE 980
browser_cookie3/__init__.py
LINE 981
just comment out both in your library which you installed on your PC
, and check again the lengths to see if it's the same as from rookiepy
from rookie.
comment out both in your library which you installed on your
PC
, and check again the lengths to see if it's the same as fromrookiepy
After the change the difference is almost gone (actually rookiepy is showing a few more cookies this time):
- length of
rookiepy.firefox()
was 668. - length of
browser_cookie3.firefox()
was 587. - length of
rookiepy.firefox(['google.com'])
was 47. - length of
browser_cookie3.firefox(domain_name='google.com')
was 43.
from rookie.
Thanks for checking, that means it probably the reason,
I published new version which takes session cookies as well :)
You can update it with
pip install -U rookiepy
from rookie.
@5j9
You right, some cookies from current session are missing.
but from what you sent something is strange,
len(rookiepy.firefox())=675
len(browser_cookie3.firefox())=7104
what's the numbers 675
and 7104
?
from rookie.
Not sure if my method of comparison above is correct
Me neither.
Idea: Print the cookies names. With rookie
and for comparison with browser_cookie3
.
from rookie.
Idea: Print the cookies names. With
rookie
and for comparison withbrowser_cookie3
.
Here is another example with names printed:
import browser_cookie3, rookiepy
print('rookiepy:')
for c in rookiepy.firefox(['github.com']):
print(c.name)
print('\n\nbrowser_cookie3:')
for c in browser_cookie3.firefox(domain_name='github.com'):
print(c.name)
Prints:
rookiepy:
_octo
logged_in
_device_id
dotcom_user
fileTreeExpanded
_docs-events
user_session
__Host-user_session_same_site
has_recent_activity
browser_cookie3:
_octo
logged_in
dotcom_user
fileTreeExpanded
color_mode
preferred_color_mode
tz
_device_id
user_session
__Host-user_session_same_site
has_recent_activity
_gh_sess
ignored_unsupported_browser_notice
tz
_docs-events
_csrf
LiSESSIONID
_gh_sess
_helphub_session
state
logged
token
_support_session
what's the numbers
675
and7104
?
They are the result of python f-string evaluation.
print(f'{1+1=}')
# prints:
# 1+1=2
from rookie.
@5j9
Oh I see, but I'm still not sure how many cookies you have from each function
len(rookiepy.firefox())=675 <- this is the len?
len(browser_cookie3.firefox())=7104 <- this is the len?
47 <- what's that?
51 <- what's that?
from rookie.
Sorry for the messy example. I should've used the same syntax for all print statements. Basically
-
length of
rookiepy.firefox()
was 675. -
length of
browser_cookie3.firefox()
was 7104. -
length of
rookiepy.firefox(['google.com']))
was 47. -
length of
browser_cookie3.firefox(domain_name='google.com')
was 51.
from rookie.
Great!
With version 0.2.5 installed:
-
length of
rookiepy.firefox()
was 7401. -
length of
browser_cookie3.firefox()
was 7096. -
length of
rookiepy.firefox(['google.com'])
was 6779. -
length of
browser_cookie3.firefox(domain_name='google.com')
was 50.
Note that now specifying domains seems to have lost its filtering effect and rookiepy.firefox(['google.com'])
returns an unusually high number of cookies.
from rookie.
Related Issues (20)
- cant decrypt value HOT 10
- python 3.12 wheels on windows and macOS HOT 2
- Incorrect expiry times HOT 3
- Retrieving session cookies expires them HOT 18
- [Bug]: Chrome config additional profiles may have "Cookies" filename instead of "Cookie" HOT 2
- [Feature Request]: Dealing with cookies with "Session" expiry HOT 2
- [Feature Request]: How to specify cookie_file and key_file in rookie? HOT 4
- [Feature Request]: Error size cannot be known at compilation time. HOT 6
- [Bug]: panicked at macos HOT 4
- [Bug]: It doesn't work correctly with Octo Browser HOT 3
- [Bug]: Firefox: Incomplete profiles.ini parsing HOT 3
- [Bug]: microsoft-edge-dev cookie file path should be dev instead of Dev? HOT 2
- [Bug]: Inability to Decrypt Cookies in Octo Browser HOT 5
- [Feature Request]: Windows reading chrome cookies that are currently in use. HOT 2
- [Feature Request]: is there a way to copy user profile of a browser? HOT 1
- [Bug]: Panic with chrome 'range end index 3 out of range for slice of length 0' HOT 1
- Can i hide the rust panic message? HOT 1
- [Feature Request]: Replace cfg_if macros with someting else HOT 1
- [Feature Request]: Can you add a function to save cookie as Netscape cookie file format? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rookie.