galaxyxone / openlinks

A simple CMS to generate and deploy a personalized webpage on IPFS
MIT License
16 stars 6 forks source link

Linktree conversion/scraper feature #136

Closed galaxyxtwo closed 1 year ago

galaxyxtwo commented 1 year ago

Connect an Openlinks account to a Linktree via user login to display Linktree links instantly - heres a Linktree Scraper from a couple years ago. Are we just scraping just the links or can we scraper the entire page with layout & background? Figure out the limitations of this and whats possible.

galaxyxtwo commented 1 year ago

I meant to list the linktree-scraper repo in my pervious comment -> https://github.com/benkaiser/linktree-scraper. This is a good starting place.

galaxyxtwo commented 1 year ago

The user inputs their linktree login and the linktree-scraper tool produces a JSON file. Assuming the JSON file is saved on a remote server (needed to avoid CORS issues), then you can read this file in JavaScript using the Fetch API method (see example below)

In this example, the JSON file is named data.json

--./index.js--

fetch('https://server.com/data.json')
    .then((response) => response.json())
    .then((json) => console.log(json));

Unfortunately, by making our Openlinks users authorize this process, we will cause them to break the Linktree terms of service. Due to this issue, we will not be proceeding with this feature at this time.