Skip to content

CFSession V1.3.0

Compare
Choose a tag to compare
@Kinuseka Kinuseka released this 08 Oct 10:09
· 54 commits to main since this release
6c2b0c8

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 to pyproject.toml configuration
  • Bug Fixes
    • cfSimulacrum will now respect Required_defaults and cfDirectory
    • 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 on cfDirectory.cookie_path(self, name) and on cfDirectory.session_path(self, name)
      from CFSession import cfDirectory
      
      directory = cfDirectory(cache_path="cacheDirectory", session_name=("cookie_filename.json", "useragent_filename.json"), chromedriver_path=None)
  • CFSession.cfdirmodel has been deprecated and moved to CFSession.cfmodels
  • cfdefaults has been deprecated and now added CFSession.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 specify ignore_defaults in CFSession.Options (instead of resetting them)
  • Removed ignore_defaults and defaults 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)
---------------------------------------------