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.1.0.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.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file linkexpander-1.1.0.tar.gz.

File metadata

  • Download URL: linkexpander-1.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for linkexpander-1.1.0.tar.gz
Algorithm Hash digest
SHA256 010f8e4457346e607a5ff65d7b3b2be208843e32b5fa083f7aad37963f6a73d1
MD5 5656c92c393a1c7057d4f3fc8dabfc25
BLAKE2b-256 826b46e677b79372328668a5e8609dd3fcfa47a7e191cb47c18d45240deb23a7

See more details on using hashes here.

File details

Details for the file LinkExpander-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: LinkExpander-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.2

File hashes

Hashes for LinkExpander-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 695f17bf024fd6eb0185f9ab4eacbc99dcb4428e1f2b5fc9382c2ec2105fe566
MD5 345714a617fc20eca6d59b5567792a4c
BLAKE2b-256 0a469732d9f0cc5c6448e7ab71d6c8bc3a08502d9b813a5715bfcfa511370413

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