This Python script scrapes fiscal reports of Japanese listed companies from the TDnet website for a specified date or today's date, and uploads them to a specified vector store for use by ChatGPT's assistant.
- Scrape fiscal reports for a given date or today's date.
- Upload reports to a specified vector store.
- Command-line argument for specifying the date.
- Required Python libraries (listed in
requirements.txt
)
-
Clone the repository
git clone https://github.com/koheiapril20/tdnet-vector-uploader.git cd tdnet-vector-uploader
-
Create and activate a virtual environment
python3 -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows
-
Install dependencies
pip install -r requirements.txt
-
Create a
.env
file in the project rootOPENAI_API_KEY=your_openai_api_key OPENAI_TARGET_VS_ID=your_target_vector_store_id
python main.py 20240620
python main.py