Skip to main content

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

Project description

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

Supported Links:

  • 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

The links list includes:

  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linkexpander-1.0.0.post2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

LinkExpander-1.0.0.post2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file linkexpander-1.0.0.post2.tar.gz.

File metadata

  • Download URL: linkexpander-1.0.0.post2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for linkexpander-1.0.0.post2.tar.gz
Algorithm Hash digest
SHA256 d46044ac2d6ffdad46e4802e37d9ecad9808efe483fedc49ba70f7d105ce85d3
MD5 cedc2b539261d8494d970fb4688bd498
BLAKE2b-256 82ea21f4b0a0d26162e2729ee77fd5f053bd617c0f9d72ffd62870cdd5cb1a2b

See more details on using hashes here.

File details

Details for the file LinkExpander-1.0.0.post2-py3-none-any.whl.

File metadata

File hashes

Hashes for LinkExpander-1.0.0.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 bca1ec8646e08904a1444ca931bfebcc8c0ef2cd23dcb08585a6ee81dd2dfcac
MD5 0bb793b6a4543d3c847a2e1e3fe06434
BLAKE2b-256 4c67891cb8ccfca5f20ce190281c56d42a9a216bf94afdf7487b2771a9e683ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page