semvec/pypi-packages huggingface dataset:
scrape-yahoo-finance 1.0.1
A python library to scrape stock, stock price, stock changes and historical data of company in yahoo finance
License: Apache License 2.0
Keywords: yahoo finance python bot_studio automation scraper stock stock_prices stock_changes historical_data

Scrape yahoo finance is a python library to scrape stock, stock prices and stock change of company, using browser automation. 
It currently runs only on windows.

### Example 1: Scrape stock, stock price, stock changes in yahoo finance main page. 
In this example we first import library to scrape data.
```sh
from scrape_yahoo_finance import *
response = yahoo.finance()
#response = {
#    "errors": [],
#    "body": [
#      {
#        "stock": "S&P Futures",
#        "stock_price": "4,699.25",
#        "stock_change": "(-0.12%)"
#      },
#      {
#        "stock": "Dow Futures",
#        "stock_price": "36,112.00",
#        "stock_change": "(-0.04%)"
#      },......]}
     
```

### Example 2: Scrape historical data from company URL.
In this example we first import library, replace "url" with "yahoo finance's company url"
```sh
from scrape_yahoo_finance import *
response = yahoo.finance_historical_data(stock_url="url")
#response = {
#    "errors": [],
#    "body": [
#      {
#        "current_price": "2,194.30",
#        "stock_name": "E-mini Russell 2000 Index Futur (RTY=F)"
#      },
#      {
#        "date": "Jan 12, 2022",
#        "open": "2,190.20",
#        "high": "2,198.00",
#        "low": "2,188.40",
#        "volume": "8,019",
#        "adj_close": "2,194.30",
#        "close": "2,194.30"
#      },....]}
     
```

#### BotStudio
[bot_studio](https://pypi.org/project/bot_studio/) is needed for browser automation. As soon as this library is imported in code, automated browser will open up in which product will be bought. To buy first login will need to be done. Login can be done either with credentials or via cookies


### Installation

```sh
pip install scrape-yahoo-finance
```

### Import
```sh
from scrape-yahoo-finance import *
```

### Send Feedback to Developers
```sh
bot_studio.send_feedback(feedback="Need help with this ......")
```

### Contact Us
* [Telegram](https://t.me/datakund)
* [Website](https://datakund.com)