Skip to main content

Extract outbound links from a URL into a CSV file from the command line.

Project description

outlink-extractor

A small Python tool to quickly extract outbound links from any given URL and export them into a CSV file.

Developed by: Amal Alexander
Email: amalalex95@gmail.com


Features

  • Simple CLI command.
  • Fetches a web page and parses all <a> tags.
  • Filters only external (outbound) links.
  • Exports results to outlink.csv (or a custom file name) in the current directory.

Each row in the CSV contains:

  • href – Absolute URL of the outbound link
  • anchor_text – Cleaned anchor text
  • rel – rel attribute value (if present)
  • target – target attribute value (if present)

Installation

You can install it locally from the source:

pip install .

Or, if you have the ZIP file:

pip install outlink-extractor.zip

(Replace with the actual path to your ZIP.)


Usage

After installation, run from your terminal:

outlink-extractor https://example.com

This will create outlink.csv in the current directory.

You can also specify a custom output file:

outlink-extractor https://example.com -o my-outlinks.csv

Notes

  • Requires Python 3.8+
  • Uses requests and beautifulsoup4 under the hood.
  • Intended for quick SEO checks, audits, and outbound link analysis.

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

outlink_extractor-0.1.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

outlink_extractor-0.1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

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