{"id":18747029,"url":"https://github.com/matheusfaustino/phrawl","last_synced_at":"2025-09-08T22:36:17.664Z","repository":{"id":57016488,"uuid":"92092280","full_name":"matheusfaustino/Phrawl","owner":"matheusfaustino","description":"Phrawl: A web crawling framework in PHP (or it seems so)","archived":false,"fork":false,"pushed_at":"2019-02-11T23:19:02.000Z","size":106,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T08:45:30.127Z","etag":null,"topics":["crawler","crawling","crawling-framework","php","scraper","wip"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/matheusfaustino.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}},"created_at":"2017-05-22T19:35:43.000Z","updated_at":"2018-12-19T01:18:19.000Z","dependencies_parsed_at":"2022-08-22T09:30:26.196Z","dependency_job_id":null,"html_url":"https://github.com/matheusfaustino/Phrawl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matheusfaustino/Phrawl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfaustino%2FPhrawl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfaustino%2FPhrawl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfaustino%2FPhrawl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfaustino%2FPhrawl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matheusfaustino","download_url":"https://codeload.github.com/matheusfaustino/Phrawl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matheusfaustino%2FPhrawl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231417,"owners_count":25245659,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"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":["crawler","crawling","crawling-framework","php","scraper","wip"],"created_at":"2024-11-07T16:28:04.486Z","updated_at":"2025-09-08T22:36:17.615Z","avatar_url":"https://github.com/matheusfaustino.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Phrawl: A web crawling framework in PHP (or it seems so)\n\nPhrawl is a lib aiming to be a web crawling framework for PHP. It was created with the idea of joining all the good libs around PHP in one place to help those who want to crawl the internet. It's inspired by Scrapy.\n\nIt is a WIP lib, so it lacks some features like integration with a webdriver (as Selenium) and an async I/O. \n\n### Installing\n`$ composer global require matheusfaustino/phrawl:dev-master`\n\n#### Example\n```\n$ phrawl \u003c\u003cEOF\n\u003c?php\nclass SpiderStackOverflow extends Phrawl\\BaseCrawler\n{\n    public \\$name = 'stackoverflow';\n    protected \\$configs = ['concurrency' =\u003e 5];\n    public \\$start_urls\n        = [\n            'https://stackoverflow.com/questions/10720325/selenium-webdriver-wait-for-complex-page-with-javascriptjs-to-load',\n            'https://stackoverflow.com/questions/9291898/selenium-wait-for-javascript-function-to-execute-before-continuing',\n            'https://stackoverflow.com/questions/23050430/does-selenium-wait-for-javascript-to-complete',\n            'https://stackoverflow.com/questions/835501/how-do-you-stash-an-untracked-file',\n            'https://stackoverflow.com/questions/5355121/passing-dict-to-constructor/5355152#5355152',\n        ];\n    public function parser(\\Phrawl\\Response \\$response)\n    {\n        \\$crawler = \\$response-\u003egetCrawler();\n        printf(\"Title: %s \\nQuestion: %s \\n\\n\", \\$crawler-\u003efilterXPath('//title')-\u003etext()\n            , \\$crawler-\u003efilterXPath('//a[@class=\"question-hyperlink\"]')-\u003etext());\n        \\$url = \\$crawler-\u003eevaluate('//div[contains(@class, \"module\")]/div/div/a[@class=\"question-hyperlink\"]')-\u003efirst();\n        \\$url = \\$url-\u003egetBaseHref().\\$url-\u003eattr('href');\n        yield new \\Phrawl\\Request(\\$url, 'first');\n    }\n    public function first(\\Phrawl\\Response \\$response)\n    {\n        printf(\"First method -- Title: %s \\n\\n\", \\$response-\u003egetCrawler()-\u003efilterXPath('//title')-\u003etext());\n    }\n}\nEOF\n```\n\nI will add more examples soon...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheusfaustino%2Fphrawl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatheusfaustino%2Fphrawl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatheusfaustino%2Fphrawl/lists"}