linktree-scraper
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Linktree Profile Scraper

This library helps you pull the links/socials from a linktree profile. This is by no means an official tool and could break by any code changes from the Linktree team.

Use of this library is at the discression of the consumer, make sure you are only scraping profiles that you have permission to use.

Usage

Install the package

npm install --save linktree-scraper

Scrape a profile

const Scraper = require("linktree-scraper").default;

Scraper('username').then(profile => {
  console.log(profile);
}).catch((error) => {
  console.error(error);
  console.log('Uh oh!');
});

The results are somewhat normalized, but you can always the raw original values with profile.raw.

Here is an example of the raw data format that is returned.

If you are using typescript, we even export the typinging for the formatted profile results, so you can do:

import Scraper, { FormattedResults } from "../lib/index";

Scraper('username').then((profile: FormattedResults) => {
  console.log(profile);
}).catch((error: Error) => {
  console.error(error);
  console.log('Uh oh!');
});

Credits

I started this library off from this template: https://github.com/krasimir/webpack-library-starter

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i linktree-scraper

Weekly Downloads

88

Version

0.3.0

License

MIT

Unpacked Size

19.2 kB

Total Files

9

Last publish

Collaborators

  • benkaiser