Command line tools to lookup the current value of a stock indices via a Google search and output as a single line.
Find a file
2023-10-07 23:44:12 +01:00
google_stocks Show market status and timestamp 2023-10-07 23:44:12 +01:00
.gitignore Add gitignore 2023-09-29 12:13:23 +01:00
ftse_all_share Initial commit 2023-09-08 00:07:40 +01:00
LICENSE Add README.md and LICENSE 2023-09-29 12:20:04 +01:00
README.md Add README.md and LICENSE 2023-09-29 12:20:04 +01:00
s_and_p_total_market Initial commit 2023-09-08 00:07:40 +01:00

Google Stock Index Lookup

Description

This Python library provides command line tools to lookup the current value of a stock index via a Google search and output the information as a single line. It leverages the Playwright library to scrape data from Google search results and parse the relevant information.

Prerequisites

  • Python 3
  • Playwright Python package

Installation

  1. Clone this repository to your local machine.
git clone https://git.4angle.com/edward/google-stocks.git
cd google-stocks
  1. Install the required Python packages:
pip install playwright

Usage

Lookup a Stock Index

To lookup the current value of a stock index and display it as a single line, you can use the provided scripts.

FTSE All Share Example

ftse_all_share

Sample Output:

FTSE All-Share Index: 4153.35 (0.85%)

S&P Total Market Example

s_and_p_total_market

Sample Output:

S&P Total Market Index (TMI): 4329.32 (0.64%)

Customization

You can customize the tool by modifying the scripts in the repository. Each script corresponds to a specific stock index lookup.

Contributing

Feel free to contribute to this project by opening issues or submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Edward Betts (edward@4angle.com)

Acknowledgments