Skip to content

Commit

Permalink
Updated scipy and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaLWang8 committed Dec 12, 2023
1 parent 1863b21 commit 9648e69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ data = yf.download("SPY AAPL", period="1mo")

### Smarter scraping

Install the `nospam` packages for smarter scraping using `pip` (see [Installation](#installation)).
Install the `nospam` packages for smarter scraping using `pip` (see [Installation](#installation)). These packages help cache calls such that Yahoo is not spammed with requests.

To use a custom `requests` session (for example to cache calls to the API or customize the `User-agent` header), pass a `session=` argument to
the Ticker constructor.
To use a custom `requests` session, pass a `session=` argument to
the Ticker constructor. This allows for caching calls to the API as well as a custom way to modify requests via the `User-agent` header.

```python
import requests_cache
Expand All @@ -195,7 +195,7 @@ ticker = yf.Ticker('msft', session=session)
ticker.actions
```

Combine a `requests_cache` with rate-limiting to avoid triggering Yahoo's rate-limiter/blocker that can corrupt data.
Combine `requests_cache` with rate-limiting to avoid triggering Yahoo's rate-limiter/blocker that can corrupt data.
```python
from requests import Session
from requests_cache import CacheMixin, SQLiteCache
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
'beautifulsoup4>=4.11.1', 'html5lib>=1.1'],
extras_require={
'nospam': ['requests_cache>=1.1.1', 'requests_ratelimiter>=0.4.2'],
'repair': ['scipy>=1.10.1'],
'repair': ['scipy>=1.6.3'],
},
# Note: Pandas.read_html() needs html5lib & beautifulsoup4
entry_points={
Expand Down

0 comments on commit 9648e69

Please sign in to comment.