CLI tool to extract inlinks and anchor text from a URL
Project description
🔗 Inlink Extractor
Inlink Extractor is a simple and lightweight Python CLI tool that extracts all internal links (<a href="">) and their associated anchor texts from a given webpage URL. It's useful for SEO audits, link analysis, and content crawling tasks.
🚀 Features
- Extract all hyperlinks (
<a>tags) from a webpage - Normalize and resolve relative URLs
- Capture anchor texts
- Export results directly to CSV
- Simple and scriptable CLI interface
📦 Installation
Make sure you have Python 3.6+ and pip installed. Then install the tool from source:
pip install .
⚠️ You must be in the root directory of the project where
setup.pyis located.
🛠️ Usage
inlink-extractor <URL> [--output filename.csv]
✅ Example
inlink-extractor https://www.example.com/finance/personal-loan/
This will:
- Crawl the given page
- Extract all anchor links and their anchor texts
- Save them to
inlinks.csvby default
🔄 Custom Output File
inlink-extractor https://example.com --output example_links.csv
📁 Output Format (CSV)
| Inlink | Anchor Text |
|---|---|
| https://www.example.com/personal-loan | Personal Loan |
| https://www.example.com/about-us | About Us |
💡 Use Cases
- Internal link audits for SEO
- Detecting orphan pages or weak linking
- Scraping anchor text context
- Competitive link structure analysis
📜 License
MIT License. Feel free to use, modify, and contribute.
🙌 Contributing
If you'd like to improve or add features, feel free to fork the repo and submit a pull request!
🧑💻 Author
Built by Amal Alexander — SEO & Python enthusiast.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inlink_extractor-0.1.0.tar.gz.
File metadata
- Download URL: inlink_extractor-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb82b629463bcae2fee4cd2f37f8364722423d209209678af8679c833894b22b
|
|
| MD5 |
f8d9a4f156dee8dae157ed598c0239e5
|
|
| BLAKE2b-256 |
46b25e61bcb78408d6bef4da83b66c3b327db993d229e070decfbd1379cc46e2
|
File details
Details for the file inlink_extractor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: inlink_extractor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42183635e695dcf49d66d8597d52390a4003f79dd09045dffc4cdc9fa2d34cd1
|
|
| MD5 |
22bff36b72c049e8bf865084ba2720d3
|
|
| BLAKE2b-256 |
182fd720ab64984bdda168f70fa4d5a5ee759a8d813ad4c6e8b996f30ac4104c
|