{"id":15889160,"url":"https://github.com/arshadkazmi42/scraplink","last_synced_at":"2025-03-20T10:31:11.811Z","repository":{"id":47746787,"uuid":"192110532","full_name":"arshadkazmi42/scraplink","owner":"arshadkazmi42","description":"Scraplink library, for scraping links and images url from a webpage","archived":false,"fork":false,"pushed_at":"2022-08-06T12:35:17.000Z","size":181,"stargazers_count":3,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T23:57:24.569Z","etag":null,"topics":["crawler","mongdb","nodejs","scraplink","url","web"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/arshadkazmi42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"arshadkazmi42"}},"created_at":"2019-06-15T18:18:40.000Z","updated_at":"2022-08-06T12:45:18.000Z","dependencies_parsed_at":"2022-07-22T00:46:58.565Z","dependency_job_id":null,"html_url":"https://github.com/arshadkazmi42/scraplink","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/arshadkazmi42%2Fscraplink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshadkazmi42%2Fscraplink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshadkazmi42%2Fscraplink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshadkazmi42%2Fscraplink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arshadkazmi42","download_url":"https://codeload.github.com/arshadkazmi42/scraplink/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244066191,"owners_count":20392407,"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","mongdb","nodejs","scraplink","url","web"],"created_at":"2024-10-06T06:41:29.048Z","updated_at":"2025-03-20T10:31:11.524Z","avatar_url":"https://github.com/arshadkazmi42.png","language":"JavaScript","funding_links":["https://github.com/sponsors/arshadkazmi42"],"categories":[],"sub_categories":[],"readme":"# scraplink \n\n[![Build](https://github.com/arshadkazmi42/scraplink/actions/workflows/nodejs.yml/badge.svg)](https://github.com/arshadkazmi42/scraplink/actions/workflows/nodejs.yml)\n[![NPM Version](https://img.shields.io/npm/v/scraplink.svg)](https://www.npmjs.com/package/scraplink)\n[![NPM Downloads](https://img.shields.io/npm/dt/scraplink.svg)](https://www.npmjs.com/package/scraplink)\n[![Github Repo Size](https://img.shields.io/github/repo-size/arshadkazmi42/scraplink.svg)](https://github.com/arshadkazmi42/scraplink)\n[![LICENSE](https://img.shields.io/npm/l/scraplink.svg)](https://github.com/arshadkazmi42/scraplink/blob/master/LICENSE)\n[![Contributors](https://img.shields.io/github/contributors/arshadkazmi42/scraplink.svg)](https://github.com/arshadkazmi42/scraplink/graphs/contributors)\n[![Commit](https://img.shields.io/github/last-commit/arshadkazmi42/scraplink.svg)](https://github.com/arshadkazmi42/scraplink/commits/master)\n\nScralink library, for scraping links and assets url from a webpage\n\n## Install\n\n```\nnpm install scraplink\n```\n\n## Usage\n\n```javascript\nconst { Scrapper } = require('scraplink');\n\n(async () =\u003e {\n  const { assets, links } = await Scrapper('http://kaspat.com');\n  console.log(assets);\n  console.log(links);\n})();\n\n// Assets URLS\n// 'http://www.theie6countdown.com/images/upgrade.jpg',\n// 'http://kaspat.com/images/img1.jpg',\n// 'http://kaspat.com/images/img2.jpg',\n// 'http://kaspat.com/images/img3.jpg',\n// 'http://kaspat.com/images/img4.jpg',\n// 'http://kaspat.com/images/page1_img1.jpg',\n// 'http://kaspat.com/images/icon1.jpg',\n// 'http://kaspat.com/images/icon2.jpg',\n// 'http://kaspat.com/images/icon3.jpg',\n// 'http://kaspat.com/images/icon4.jpg',\n// 'http://www.e-zeeinternet.com/count.php?page=986859\u0026style=odometer\u0026nbdigits=8\u0026reloads=1'\n\n// Links\n// 'http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode',\n// 'http://kaspat.com/index.php',\n// 'http://kaspat.com/index.php',\n// 'http://kaspat.com/News.php',\n// 'http://kaspat.com/Services.php',\n// 'http://kaspat.com/Kaspat.php',\n// 'http://kaspat.com/Clients.php',\n```\n\n## API\n\n- `Scrapper`\n  - Takes url input and scraps assets url and links from the page\n\n- `Parse`\n  - Parse exposes two functions, as defined below\n\n  - `assets`\n    - Fetches all the assets from the html data\n\n  - `links`\n    - Fetches all the links from the html data\n\n- `ScrapperUtil`\n\n  - `formatRelativeUrls`\n    - Formats relative urls to absolute (takes rootUrl and array urls as input)\n\n## Contributing\n\nInterested in contributing to this project?\nYou can log any issues or suggestion related to this library [here](https://github.com/arshadkazmi42/scraplink/issues/new)\n\nRead our contributing [guide](CONTRIBUTING.md) on getting started with contributing to the codebase\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshadkazmi42%2Fscraplink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farshadkazmi42%2Fscraplink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshadkazmi42%2Fscraplink/lists"}