{"id":24443906,"url":"https://github.com/zoroxide/spiderman","last_synced_at":"2025-03-14T03:14:25.682Z","repository":{"id":272795192,"uuid":"917781278","full_name":"zoroxide/spiderman","owner":"zoroxide","description":"simple web scraping library for C++","archived":false,"fork":false,"pushed_at":"2025-01-16T18:14:15.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T00:57:26.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/zoroxide.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":"2025-01-16T16:26:57.000Z","updated_at":"2025-01-16T18:14:16.000Z","dependencies_parsed_at":"2025-01-16T18:01:10.981Z","dependency_job_id":"39c40ade-9c30-43ae-b646-75d98d2c99b5","html_url":"https://github.com/zoroxide/spiderman","commit_stats":null,"previous_names":["zoroxide/spiderman"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoroxide%2Fspiderman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoroxide%2Fspiderman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoroxide%2Fspiderman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoroxide%2Fspiderman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoroxide","download_url":"https://codeload.github.com/zoroxide/spiderman/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243515562,"owners_count":20303258,"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":[],"created_at":"2025-01-20T22:18:47.003Z","updated_at":"2025-03-14T03:14:25.660Z","avatar_url":"https://github.com/zoroxide.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spiderman Web Scraper Framework\n\nSpiderman is a lightweight C++ framework for web scraping. It allows you to fetch and parse HTML content from a given URL using `libcurl`. The parsed content is tokenized into `TAG` and `TEXT` tokens, providing a foundation for further processing.\n\n## Features\n\n- Fetch HTML content from a URL.\n- Tokenize HTML into `TAG` and `TEXT` components.\n- Simple and easy-to-use API.\n\n## Requirements\n\n- C++17 or later\n- `libcurl`\n\n## Installation\n### *Windows support and test are comming soon :)*\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/zoroxide/spiderman.git\n   cd spiderman\n   ```\n\n2. Install `libcurl` (if not already installed):\n   ```bash\n   # For Debian/Ubuntu\n   sudo apt update \u0026\u0026 sudo apt install libcurl4-openssl-dev\n   ```\n\n3. Compile the code using a C++ compiler:\n   ```bash\n   g++ -std=c++17 -lcurl -o spiderman main.cpp spiderman.cpp\n   ```\n\n## Usage\n\n### Example Code\n\n```cpp\n#include \u003cbits/stdc++.h\u003e\n#include \"spiderman.hpp\"\n\nint main() {\n    std::string url = \"https://zoroxide.pages.dev\";\n\n    spiderman scraper(url);\n    \n    std::string content = scraper.fetch();\n    std::vector\u003cToken\u003e tokens = scraper.parse();\n\n    if (!content.empty()) {\n        for (const auto\u0026 token : tokens) {\n            std::cout \u003c\u003c \"Type: \" \u003c\u003c token.type \u003c\u003c \", Value: \" \u003c\u003c token.value \u003c\u003c std::endl;\n        }\n    } else {\n        std::cerr \u003c\u003c \"Failed to fetch content from \" \u003c\u003c url \u003c\u003c std::endl;\n    }\n\n    return 0;\n}\n```\n\n### Token Structure\n\nThe `Token` structure represents the components of the parsed HTML:\n```cpp\nstruct Token {\n    std::string type;  // \"TAG\" or \"TEXT\"\n    std::string value; // The HTML tag or text content\n};\n```\n\n## File Structure\n\n```\n├── examples          # Examples\n├── spiderman.hpp     # Header file\n├── spiderman.cpp     # Implementation file\n```\n\n## Compilation\n\nTo compile the example:\n```bash\ng++ examples/{example}.cpp spiderman.cpp -o example -lcurl\nsudo ./example\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contribution\n\nContributions are welcome! Please feel free to open issues or submit pull requests.\n\n## Author\n\n[Loay Mohamed](https://github.com/zoroxide)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoroxide%2Fspiderman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoroxide%2Fspiderman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoroxide%2Fspiderman/lists"}