{"id":25965064,"url":"https://github.com/basemax/list-data-drugs","last_synced_at":"2026-02-27T11:09:14.595Z","repository":{"id":280662159,"uuid":"941522954","full_name":"BaseMax/list-data-drugs","owner":"BaseMax","description":"This Python script scrapes drug-related information from the \"Talk to Frank\" website and saves the extracted data in both JSON and YAML formats. It utilizes the `requests` library to fetch the webpage, `BeautifulSoup` for HTML parsing, and `json` and `yaml` libraries for data storage.","archived":false,"fork":false,"pushed_at":"2025-03-02T14:01:27.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T17:14:39.740Z","etag":null,"topics":["database","db-drug","drug","drug-database","drug-db","drug-discovery","drugs","json","python","yaml","yml"],"latest_commit_sha":null,"homepage":"https://www.talktofrank.com/drugs-a-z","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/BaseMax.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":"2025-03-02T13:54:38.000Z","updated_at":"2025-03-03T10:53:21.000Z","dependencies_parsed_at":"2025-03-04T17:14:40.963Z","dependency_job_id":"55c60f6c-9a3d-4c1c-a77b-0ce8feb9d5ac","html_url":"https://github.com/BaseMax/list-data-drugs","commit_stats":null,"previous_names":["basemax/list-data-drugs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Flist-data-drugs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Flist-data-drugs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Flist-data-drugs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2Flist-data-drugs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/list-data-drugs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241924576,"owners_count":20043238,"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":["database","db-drug","drug","drug-database","drug-db","drug-discovery","drugs","json","python","yaml","yml"],"created_at":"2025-03-04T21:29:20.232Z","updated_at":"2026-02-27T11:09:12.672Z","avatar_url":"https://github.com/BaseMax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drug List Scraper\n\nThis Python script scrapes drug-related information from the \"Talk to Frank\" website and saves the extracted data in both JSON and YAML formats. It utilizes the `requests` library to fetch the webpage, `BeautifulSoup` for HTML parsing, and `json` and `yaml` libraries for data storage.\n\n## Features\n\n- Scrapes drug names, types, and links from the Talk to Frank website.\n- Saves extracted data in `drugs.json` (JSON format) and `drugs.yaml` (YAML format).\n- Uses a user-agent header to mimic a browser request.\n- Handles request failures gracefully.\n\n## Requirements\n\nEnsure you have Python installed (Python 3.x recommended). Install the required dependencies using:\n\n```sh\npip install requests beautifulsoup4 pyyaml\n```\n\n## Usage\n1. Clone or download this repository.\n2. Run the script using:\n\n```sh\npython script.py\n```\n\n3. The script will:\n   - Scrape drug information from the website.\n   - Save the data to `drugs.json` and `drugs.yaml`.\n   - Print the extracted information in the console.\n\n## Output Files\n\n- `drugs.json`: Contains the extracted drug data in JSON format.\n- `drugs.yaml`: Contains the extracted drug data in YAML format.\n\n## Code Explanation\n\n- Sends an HTTP GET request to `https://www.talktofrank.com/drugs-a-z`.\n- Parses the HTML content to extract drug names, types, and links.\n- Saves the extracted data to `drugs.json` and `drugs.yaml`.\n- Uses exception handling to manage request failures.\n\n## Example Output\n\nA sample JSON entry:\n\n```json\n[\n    {\n        \"name\": \"A2\",\n        \"type\": \"Piperazines\",\n        \"link\": \"https://www.talktofrank.com/drug/piperazines?a=A2\"\n    }\n]\n```\n\n## License\n\nThis project is licensed under the MIT License.\n\nCopyright 2025, Max Base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Flist-data-drugs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Flist-data-drugs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Flist-data-drugs/lists"}