CFSession V1.3.0
This has been the biggest update I have ever stacked up so far. I have been slow at my progress as I was very busy, but along the way I found so many ideas to compile into this one big update.
undetected-chromedriver
at its current state is pretty unstable, so I will be switching to SeleniumBase
by v2.0
I dont have time to test proxy on this current update so I have never fully implemented it. But if anyone's willing to make a PR feel free.
I will be continually maintaining if I feel motivated to do so, as it is very useful for my use cases then I will be motivated for quite awhile. Contributors are welcome and free to open a PR if you think it is valuable to the feature set of CFSession.
What's Changed
- Migrated from
setup.py
topyproject.toml
configuration - Bug Fixes
cfSimulacrum
will now respectRequired_defaults
andcfDirectory
- Fixed context manager not closing properly
- Added more type hints and improved docstrings
- Changed the structure of handling requests
- Added forgotten
head
method - cfDirectory update
- Removed redundant and confusing arguments
- removed
path
argument,cache_path
will replace it. - Added
session_name
argument, intended to make it user friendly when customizing naming on cookie dump files.- Removed
name
oncfDirectory.cookie_path(self, name)
and oncfDirectory.session_path(self, name)
- Removed
from CFSession import cfDirectory directory = cfDirectory(cache_path="cacheDirectory", session_name=("cookie_filename.json", "useragent_filename.json"), chromedriver_path=None)
- removed
- Removed redundant and confusing arguments
CFSession.cfdirmodel
has been deprecated and moved toCFSession.cfmodels
cfdefaults
has been deprecated and now addedCFSession.cfmodels.Options
to replace this.- Rearranged some unchanging variables to constants for conventions
- Internal handlers Updated:
- Improved cookie date token refresh
- Easier API to get when the token expires
- We will now reuse your current
chrome_options
if you specifyignore_defaults
inCFSession.Options
(instead of resetting them) - Removed
ignore_defaults
anddefaults
argument on SBP class (ignore_defaults has been moved to Options) - Optimized bypass loop time
Known Issues
- Proxy does not work properly on UC driver, therefore using proxy to bypass might cause more issues
- Chrome still open as a background process after doing
.close()
(Windows)
Full Changelog: 1.2.1...1.3.0
Logs:
V1.3.0 - Added features, deprecation, behaviour changes, bug fixes
V1.2.1 - Fixed user agent causing detection
V1.2.0 - Bypass improvement, optimization and bug fixes
V1.1.0 - Bypass optimization and user-agent spoof
V1.0.0 - Added strategies to bypass cf, headless mode
---------------------------------------------
V0.2.3 - incorrect exception raise, minor refactoring
V0.2.2 - Bug fix, exception inheritence issue, runtime error resolved
V0.2.1 - Workflow update, xvfb error fixed, unicode on none unicode environment
V0.2.0 - Changed API behavior, easier access to backend (named: cfSimulacrum)
---------------------------------------------