{"id":18212013,"url":"https://github.com/bedus-creation/laravel-parser","last_synced_at":"2025-07-26T01:05:33.788Z","repository":{"id":46274309,"uuid":"422520367","full_name":"bedus-creation/laravel-parser","owner":"bedus-creation","description":"Html Parser For Laravel PHP","archived":false,"fork":false,"pushed_at":"2021-11-03T03:12:35.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T22:37:14.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bedus-creation.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":"2021-10-29T09:42:02.000Z","updated_at":"2021-11-03T03:11:06.000Z","dependencies_parsed_at":"2022-08-31T11:03:00.558Z","dependency_job_id":null,"html_url":"https://github.com/bedus-creation/laravel-parser","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedus-creation%2Flaravel-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedus-creation%2Flaravel-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedus-creation%2Flaravel-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bedus-creation%2Flaravel-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bedus-creation","download_url":"https://codeload.github.com/bedus-creation/laravel-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247730069,"owners_count":20986404,"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":"2024-11-03T15:04:24.001Z","updated_at":"2025-04-07T21:16:27.720Z","avatar_url":"https://github.com/bedus-creation.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Parser\n\nHTML parser for Laravel/PHP.\n\n### Introduction\n\nThis packages parses html responses, with very efficient APIs. But it doesn't parse any url.\n\n\u003e This package is Laravel wrapper of https://github.com/symfony/dom-crawler\n\n### Installation\n```shell\ncomposer require aammui/laravel-parser\n```\n\n### Uses\n\n```php\nuse Aammui\\LaravelParser\\Facade\\PHPSoup;\n\n$html = \u003c\u003c\u003cEND\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n   \u003ctitle\u003e\n    The Dormouse's story\n   \u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n   \u003cp class=\"title\"\u003e\n    \u003cb\u003e\n     The Dormouse's story\n    \u003c/b\u003e\n   \u003c/p\u003e\n   \u003cp class=\"story\"\u003e\n    Once upon a time there were three little sisters; and their names were\n    \u003ca class=\"sister\" href=\"http://example.com/elsie\" id=\"link1\"\u003e\n     Elsie\n    \u003c/a\u003e\n    ,\n    \u003ca class=\"sister\" href=\"http://example.com/lacie\" id=\"link2\"\u003e\n     Lacie\n    \u003c/a\u003e\n    and\n    \u003ca class=\"sister\" href=\"http://example.com/tillie\" id=\"link3\"\u003e\n     Tillie\n    \u003c/a\u003e\n    ; and they lived at the bottom of a well.\n   \u003c/p\u003e\n   \u003cp class=\"story\"\u003e\n    ...\n   \u003c/p\u003e\n  \u003c/body\u003e\n \u003c/html\u003e\nEND;\n\n$soup = PHPSoup::Parse($html);\n\n// Outputs: \u003ctitle\u003eThe Dormouse's story\u003c/title\u003e \necho $soup-\u003eget('title')-\u003efirst()-\u003eouterHtml();\n\n// Outputs: The Dormouse's story\necho $soup-\u003eget('title')-\u003efirst()-\u003etext();\n\n// Output: \necho $soup-\u003eget('p')-\u003efirst()-\u003eattributes(\"href\");\n\n// [\u003ca class=\"sister\" href=\"http://example.com/elsie\" id=\"link1\"\u003eElsie\u003c/a\u003e,\n//  \u003ca class=\"sister\" href=\"http://example.com/lacie\" id=\"link2\"\u003eLacie\u003c/a\u003e,\n//  \u003ca class=\"sister\" href=\"http://example.com/tillie\" id=\"link3\"\u003eTillie\u003c/a\u003e]\necho $soup-\u003eget(\"a\");\n\n// Search by attributes\necho $soup-\u003eget(\"li[data-item]\")-\u003eouterHtml();\necho $soup-\u003eget(\"li[data-item='2']\")-\u003eouterHtml();\n\n// Search by Css\necho $soup-\u003eget(\"head \u003e title\")-\u003eouterHtml();\n# [\u003ctitle\u003eThe Dormouse's story\u003c/title\u003e]\n\n// Find the siblings of tags:\necho $soup-\u003eget(\"#link1 ~ .sister\")-\u003eouterHtml();\n# [\u003ca class=\"sister\" href=\"http://example.com/lacie\" id=\"link2\"\u003eLacie\u003c/a\u003e,\n#  \u003ca class=\"sister\" href=\"http://example.com/tillie\"  id=\"link3\"\u003eTillie\u003c/a\u003e]\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedus-creation%2Flaravel-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbedus-creation%2Flaravel-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedus-creation%2Flaravel-parser/lists"}