{"id":23357272,"url":"https://github.com/hermaeus1618/nsdlscrapper","last_synced_at":"2026-05-14T20:32:04.644Z","repository":{"id":267129918,"uuid":"900341732","full_name":"Hermaeus1618/NSDLScrapper","owner":"Hermaeus1618","description":"Foreign Institutional Investor NSDL","archived":false,"fork":false,"pushed_at":"2024-12-08T14:36:52.000Z","size":4,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T20:13:04.218Z","etag":null,"topics":["python","scrapper","selenium","stock-market"],"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/Hermaeus1618.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":"2024-12-08T14:34:37.000Z","updated_at":"2025-01-02T22:27:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8f61ad4-0dbd-4e07-896c-4a678318cca4","html_url":"https://github.com/Hermaeus1618/NSDLScrapper","commit_stats":null,"previous_names":["hermaeus1618/nsdlscrapper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hermaeus1618%2FNSDLScrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hermaeus1618%2FNSDLScrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hermaeus1618%2FNSDLScrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hermaeus1618%2FNSDLScrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hermaeus1618","download_url":"https://codeload.github.com/Hermaeus1618/NSDLScrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247721899,"owners_count":20985084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["python","scrapper","selenium","stock-market"],"created_at":"2024-12-21T10:19:57.298Z","updated_at":"2025-09-25T13:16:31.979Z","avatar_url":"https://github.com/Hermaeus1618.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FOREIGN INSTITUTIONAL INVESTOR NSDL\n\nA Selenium approach for scrapping FII trading data from https://www.fpi.nsdl.co.in.\n\nI am only uploading algorithm for data fetching for the time being.\nData is filtered to remove any 'mid-table totaling' so that it can be use for a larger timeframe.\n\nThis approach is timeout error proof in most cases.\n\nSpeed of this algorithm is quite high because instead of using selenium functions for navigation it executes javascript using `webdriver.Firefox.execute_script()` directly from browsers API.\n\nData can be combined from ZIP by:\n```python\nimport polars as pl\nMAXDATE=3600\nDFLIST=[]\nwith zipfile.ZipFile(NSDLCore.DIRECTORY_NSDL_FII_EQUITY_FILE, \"r\") as ZFILE:\n    DATERANGE=[int(F.filename) for F in ZFILE.infolist()][-MAXDATE:]\n    for i in range(len(DATERANGE)):\n        with ZFILE.open(f\"{DATERANGE[i]}\", \"r\") as WZFILE:\n            XDF=pl.read_parquet(io.BytesIO(WZFILE.read()))\n            DFLIST.append(XDF)\nDF=pl.concat(DFLIST)\n```\n\nIn this example i have used polars which is significantly faster than pandas in this algorithm but you can also use pandas simply as:\n\n```python\nimport pandas as pd\nwith zipfile.ZipFile(NSDLCore.DIRECTORY_NSDL_FII_EQUITY_FILE, \"r\") as ZFILE:\n    DATERANGE=[int(F.filename) for F in ZFILE.infolist()][-MAXDATE:]\n    for i in range(len(DATERANGE)):\n        with ZFILE.open(f\"{DATERANGE[i]}\", \"r\") as WZFILE:\n            XDF=pd.read_parquet(io.BytesIO(WZFILE.read()))\n            DFLIST.append(XDF)\nDF=pd.concat(DFLIST)\n```\n\nDerivatives section is currently under debugging after major NSDL server update.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhermaeus1618%2Fnsdlscrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhermaeus1618%2Fnsdlscrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhermaeus1618%2Fnsdlscrapper/lists"}