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

Add cookie & crumb to requests #1657

Merged
merged 4 commits into from
Nov 18, 2023
Merged

Add cookie & crumb to requests #1657

merged 4 commits into from
Nov 18, 2023

Commits on Nov 13, 2023

  1. Add cookie & crumb to requests

    Add cookie & crumb to requests. Involves several changes:
    - fetch cookie & crumb, obviously.
    - two different cookie strategies - one seems to work better in USA, other better outside.
    - yfinance auto-detects if one strategy fails, and switches to other strategy.
    - cookie is stored in persistent cache folder, alongside timezones. Refetched after 24 hours.
    
    To have this work well with multithreading (yfinance.download()) requires more changes:
    - all threads share the same cookie, therefore the same session object. Requires thread-safety ...
    - converted data class to a singleton with "SingletonMeta":
     - the first init() call initialises data.
     - but successive calls update its session object - naughty but necessary.
    - thread locks to avoid deadlocks and race conditions.
    ValueRaider committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    4466e57 View commit details
    Browse the repository at this point in the history
  2. Beta version 0.2.32b1

    ValueRaider committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    1b0d835 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. Configuration menu
    Copy the full SHA
    63a3531 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2023

  1. Final tidy before merge

    ValueRaider committed Nov 18, 2023
    Configuration menu
    Copy the full SHA
    91efcd8 View commit details
    Browse the repository at this point in the history