Socket
Book a DemoInstallSign in
Socket

LinkExpander

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

LinkExpander

Link expander in Python which parses and returns the URLs and information in common link domains.

pipPyPI
Version
1.0.0.post2
Maintainers
1

LinkExpander

Link expander in Python which parses and returns the URLs and information in common link domains. (The currently supported links are in below)

REQUIRES PYTHON>=3.10

  • Linktr.ee
  • Hoo.be
  • Snipfeed.co*
  • Beacons.ai
  • Allmylinks.com*
  • Msha.ke
  • Linkr.bio
  • Carrd.co
  • Lnk.bio
  • Direct.me*
  • Link.me
  • Taplink.cc

* These sites heavily rely on Cloudflare bypass and can be patched at any time. (Despite using UndetectedChromedriver)

Usage

First, download and install the dependencies:

py -m pip install -r requirements.txt

Then, place the script inside your project directory and import the function:

from LinkExpander import gather_links

After that, call gather_links with the URL of the linksite:

...

links_info = gather_links("URL")

Returned Data

This will return a dictionary. Although the different sites will return more/less information than one another, they all will have the following fields:

  • username: Account username
  • avatar: Account avatar
  • links: A list of the scraped links
  • domain: Domain of the link
  • title: Title of the link
  • url: URL of the link

The typical returned dictionary looks like this:

  {
"username" : "Some username",
"avatar" : "URL of the avatar",
"links" : [
  {"title" : "Example1", "domain" : "google.com", "url" : "https://google.com"},
  {"title" : "Example2", "domain" : "facebook.com", "url" : "https://facebook.com/..."}
  ]
}

Credits

Credits 100% to @devdagoat

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts