{"id":16509051,"url":"https://github.com/hemanta212/stock-scraper","last_synced_at":"2026-04-28T16:37:53.472Z","repository":{"id":252638437,"uuid":"649282936","full_name":"hemanta212/stock-scraper","owner":"hemanta212","description":"Scraper For Stock Information From Yahoo Finance Website","archived":false,"fork":false,"pushed_at":"2024-08-11T11:38:36.000Z","size":340,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T05:41:54.301Z","etag":null,"topics":["api","ci","finance","postgresql","proxy","pytest","python","scraper","sqlite","tests","threading","type-safety","yahoo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hemanta212.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-04T11:23:42.000Z","updated_at":"2025-02-22T15:57:08.000Z","dependencies_parsed_at":"2024-08-12T00:16:41.507Z","dependency_job_id":null,"html_url":"https://github.com/hemanta212/stock-scraper","commit_stats":null,"previous_names":["hemanta212/stock-scraper"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hemanta212/stock-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemanta212%2Fstock-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemanta212%2Fstock-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemanta212%2Fstock-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemanta212%2Fstock-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hemanta212","download_url":"https://codeload.github.com/hemanta212/stock-scraper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemanta212%2Fstock-scraper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","ci","finance","postgresql","proxy","pytest","python","scraper","sqlite","tests","threading","type-safety","yahoo"],"created_at":"2024-10-11T15:48:49.900Z","updated_at":"2026-04-28T16:37:53.440Z","avatar_url":"https://github.com/hemanta212.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S-IN-S: Stock Info Scraper\n\u003c!-- [![Build](https://github.com/Stockinerary/thc_beh_2023_hemanta/actions/workflows/main.yml/badge.svg)](https://github.com/Stockinerary/thc_beh_2023_hemanta/actions/workflows/main.yml)--\u003e\n[![Tests](https://github.com/Stockinerary/thc_beh_2023_hemanta/actions/workflows/tests.yml/badge.svg)](https://github.com/Stockinerary/thc_beh_2023_hemanta/actions/workflows/tests.yml)\n\nScrapes the stock information off the YahooAPI and StockAnalysis.com.\n\n- Supports SQLITE and PostgresQL database and allows exporting to CSVs\n\n- The Scraping Job runs every 6 hours here on github actions, saves to remote postgres and sqlite databases.\n\n- The postgresql database is hosted live at custom azure vps @ v.hemantasharma.com.np\n\n- You can obtain the build artifacts of `data.csv` and `database.sqlite` in releases section.\n\n## Instructions for local installation\n\n- Clone this repository\n\n```bash\ncd Stock-Scraper\npython -m venv .venv\nsource .venv/bin/activate\npython -m pip install -r requirements.txt\nplaywright install\npython main.py\n```\n\nSqlite db output will be created at data directory in current folder\n\n## Setting up Postgresql Database [Optional]\n\n1. Install postgres client and server:\n\n```\nsudo apt-get install postgresql postgresql-contrib postgresql-client\n```\n\n\n2. Start the postgres service\n\n```\nsudo service postgresql start\n```\n\n3. Login to the psql shell\n\n```\nsudo -i -u postgres psql\n// psql postgres for macos systems\n```\n\n2. Now create a user and password\n\n```\nCREATE USER sammy WITH PASSWORD 'password';\n```\n\nNOTE: Don't forget the `;` semicolon, You should see the output `CREATE ROLE`\n\n3. And create a database using created user account\n\n```\nCREATE DATABASE sammydb OWNER sammy;\n```\n\n4. Quit the psql shell\n\n```\n\\q\n```\n\n4. You can access created database with created user by,\n\n```\npsql -U name_of_user -d name_of_database\n```\n\n5. Populate the `.env` file, Fill the dbname, username and password according to your above steps.\n\n```\nPOSTGRES_HOST=localhost\nPOSTGRES_PORT=5432\nPOSTGRES_DB=yourDbName\nPOSTGRES_USER=yourUserName\nPOSTGRES_PASSWORD=yourPassword\n```\n\n6. Run the script again.\n\n```\npython main.py\n```\n\n7. Exporting Postgres to csv\n\n```\npython export.py\n```\n\nCSV file will be created inside data folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemanta212%2Fstock-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhemanta212%2Fstock-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemanta212%2Fstock-scraper/lists"}