{"id":20267265,"url":"https://github.com/potlock/mechanism-scraper","last_synced_at":"2026-05-22T16:37:58.736Z","repository":{"id":253221510,"uuid":"842852598","full_name":"PotLock/mechanism-scraper","owner":"PotLock","description":"A script to scrape mechanism institute and possibly allo book to develop an Open API for mechanism design","archived":false,"fork":false,"pushed_at":"2024-08-26T06:38:32.000Z","size":21,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-08-26T08:12:04.340Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PotLock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-08-15T08:29:09.000Z","updated_at":"2024-08-26T06:38:36.000Z","dependencies_parsed_at":"2024-08-15T10:05:49.462Z","dependency_job_id":"0b47e928-6e40-4993-b7dc-958961f23e9e","html_url":"https://github.com/PotLock/mechanism-scraper","commit_stats":null,"previous_names":["potlock/mechanism-scraper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PotLock/mechanism-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fmechanism-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fmechanism-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fmechanism-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fmechanism-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PotLock","download_url":"https://codeload.github.com/PotLock/mechanism-scraper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Fmechanism-scraper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33354040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-14T12:14:00.198Z","updated_at":"2026-05-22T16:37:58.720Z","avatar_url":"https://github.com/PotLock.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mechanism Institute Library Scraper\n\nThis Python script automates the process of scraping data from the Mechanism Institute's library. It uses Selenium to control a Brave browser instance and extract data from web pages. The data is saved in both CSV and JSON formats.\n\n## Table of Contents\n\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Setup](#setup)\n- [Usage](#usage)\n- [Environment Variables](#environment-variables)\n- [Output](#output)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- Automatically scrolls to the bottom of the page to ensure all elements are loaded.\n- Scrapes data and saves it to both CSV and JSON files.\n- Configurable via environment variables, allowing easy setup on different machines.\n\n## Prerequisites\n\nBefore running the script, ensure you have the following installed:\n\n- Python 3.8 or higher\n- Brave Browser\n- Google ChromeDriver (compatible with your Brave version)\n- [pip](https://pip.pypa.io/en/stable/)\n\n## Installation\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/your-username/mechanism-scraper.git\n   cd mechanism-scraper\n   ```\n\n2. **Create and activate a virtual environment:**\n\n   ```bash\n   python3 -m venv myenv\n   source myenv/bin/activate\n   ```\n\n3. **Install the required Python packages:**\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n   If the `requirements.txt` does not exist, you can install the dependencies manually:\n\n   ```bash\n   pip install selenium webdriver_manager python-dotenv pandas\n   ```\n\n## Setup\n\n### Environment Variables\n\nCreate a `.env` file in the root of the project directory to store your environment-specific variables:\n\n```bash\ntouch .env\n```\n\nAdd the following lines to the `.env` file, replacing the placeholder paths with your actual paths:\n\n```env\nCHROMEDRIVER_PATH=/path/to/your/chromedriver\nBRAVE_BROWSER_PATH=/Applications/Brave Browser.app/Contents/MacOS/Brave Browser\n```\n\n### Example `.env` File\n\n```env\nCHROMEDRIVER_PATH=/Users/your-username/Downloads/chromedriver\nBRAVE_BROWSER_PATH=/Applications/Brave Browser.app/Contents/MacOS/Brave Browser\n```\n\n### Note\n\n- Ensure that the ChromeDriver version matches the Brave browser version installed on your machine.\n- Make the `chromedriver` binary executable if needed:\n\n  ```bash\n  chmod +x /path/to/your/chromedriver\n  ```\n\n## Usage\n\nTo run the script, use the following command:\n\n```bash\npython mechanism_scrape.py\n```\n\nThe script will launch a headless Brave browser, navigate to the specified page, and scrape the data. The scraped data will be saved as both CSV and JSON files in the current directory.\n\n## Output\n\nThe script generates two output files:\n\n- `mechanism_institute_library.csv`: A CSV file containing the scraped data.\n- `mechanism_institute_library.json`: A JSON file containing the scraped data.\n\n## Troubleshooting\n\n- **SessionNotCreatedException**: Ensure the ChromeDriver version matches the installed Brave browser version.\n- **No Chrome Binary Error**: Check the `BRAVE_BROWSER_PATH` in the `.env` file to ensure it points to the correct location of the Brave binary.\n- **Permission Denied Error**: Make sure that `chromedriver` is executable. Use `chmod +x /path/to/your/chromedriver`.\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Make your changes.\n4. Commit your changes (`git commit -m 'Add some feature'`).\n5. Push to the branch (`git push origin feature-branch`).\n6. Open a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotlock%2Fmechanism-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotlock%2Fmechanism-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotlock%2Fmechanism-scraper/lists"}