{"id":13564588,"url":"https://github.com/alash3al/scraply","last_synced_at":"2025-04-28T14:27:24.922Z","repository":{"id":43409881,"uuid":"189255840","full_name":"alash3al/scraply","owner":"alash3al","description":"Scraply a simple dom scraper to fetch information from any html based website","archived":false,"fork":false,"pushed_at":"2022-07-07T20:14:48.000Z","size":49,"stargazers_count":126,"open_issues_count":2,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T10:33:41.440Z","etag":null,"topics":["crawler","crawling","dom","golang","scraper","scrapers","scraping-websites","scrapy","server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alash3al.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}},"created_at":"2019-05-29T15:50:34.000Z","updated_at":"2025-03-12T10:08:09.000Z","dependencies_parsed_at":"2022-07-08T21:31:22.017Z","dependency_job_id":null,"html_url":"https://github.com/alash3al/scraply","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alash3al%2Fscraply","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alash3al%2Fscraply/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alash3al%2Fscraply/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alash3al%2Fscraply/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alash3al","download_url":"https://codeload.github.com/alash3al/scraply/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251328889,"owners_count":21571996,"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":["crawler","crawling","dom","golang","scraper","scrapers","scraping-websites","scrapy","server"],"created_at":"2024-08-01T13:01:33.306Z","updated_at":"2025-04-28T14:27:24.896Z","avatar_url":"https://github.com/alash3al.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"Scraply\n========\n\u003e Scraply, is a very simple html scraping tool, if you know css \u0026 jQuery then you can use it!, scraply should be simple and tiny as well it could be used as a component in a large system something like [this use-case](https://github.com/alash3al/scraply/issues/1#issuecomment-570082314)\n\nOverview\n========\n\u003e you can use `scraply` within your stack via `cli` or `http`.  \n```bash\n# here is the CLI usage\n\n# extracting the title and the description from scraply github repo page\n$ scraply extract \\\n    -u \"https://github.com/alash3al/scraply\" \\\n    -x title='$(\"title\").text()' \\\n    -x description='$(\"meta[name=description]\").attr(\"content\")'\n\n# same thing but with custom user agent\n$ scraply extract \\\n    -u \"https://github.com/alash3al/scraply\" \\\n    -ua \"OptionalCustomUserAgent\"\\\n    -x title='$(\"title\").text()' \\\n    -x description='$(\"meta[name=description]\").attr(\"content\")'\n\n# same thing but with asking scraply to return the response body for debugging purposes\n$ scraply extract \\\n    --return-body \\\n    -u \"https://github.com/alash3al/scraply\" \\\n    -x title='$(\"title\").text()' \\\n    -x description='$(\"meta[name=description]\").attr(\"content\")'\n```\n\n\u003e for `http` usage, we will run the http server then using any http client to interact with it.  \n```bash\n# running the http server\n# by default it listens on address \":8010\" which equals to \"0.0.0.0:8010\"\n# for more information execute `$ scraply help`\n$ scraply serve\n\n# then in another shell let's execute the following curl \n$ curl http://localhost:8010/extract \\\n    -H \"Content-Type: application/json\" \\\n    -s \\\n    -d '{\"url\": \"https://github.com/alash3al/scraply\", \"extractors\": {\"title\": \"$(\\\"title\\\").text()\"}, \"return_body\": false, \"user_agent\": \"CustomeUserAgent\"}'\n```\n\n\u003e for debugging, there is `shell`\n```bash\n$ scraply shell -u https://github.com/alash3al/scraply\n➜ (scraply) \u003e $(\"title\").text()\nGitHub - alash3al/scraply: Scraply a simple dom scraper to fetch information from any html based website and convert that info to JSON APIs\n\n➜ (scraply) \u003e request.url\nhttps://github.com/alash3al/scraply\n\n➜ (scraply) \u003e response.status_code\n200\n\n➜ (scraply) \u003e response.url\nhttps://github.com/alash3al/scraply\n\n➜ (scraply) \u003e response.body\n\u003chtml\u003e.....\n```\n\nDownload ?\n==========\n\u003e you can go to the [releases page](https://github.com/alash3al/scraply/releases) and pick the latest version.\n\u003e or you can `$ docker run --rm -it ghcr.io/alash3al/scraply scraply help`\n\n\nContribution ?\n==============\n\u003e for sure you can contribute, how?\n\n- clone the repo\n- create your fix/feature branch\n- create a pull request\n\nnothing else, enjoy!\n\nAbout\n=====\n\u003e I'm [Mohamed Al Ashaal](https://alash3al.com), a software engineer :)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falash3al%2Fscraply","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falash3al%2Fscraply","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falash3al%2Fscraply/lists"}