Skip to main content

Contributors

Daniel Burrows <dburrows@debian.org> (Original Author)

Scott Hansen <firecat4153@gmail.com> (Maintainer)

Maxime Chatelle <xakz@rxsoft.eu> (Debian Maintainer)

Purpose and Requirements

Urlscan is a small program that is designed to integrate with the “mutt” mailreader to allow you to easily launch a Web browser for URLs contained in email messages. It is a replacement for the “urlview” program.

Requires: Python 2.6+ (including Python 3.x) and the python-urwid library

Features

Urlscan parses an email message or file and scans it for URLs and email addresses. It then displays the URLs and their context within the message, and allows you to choose one or more URLs to send to your Web browser. Alternatively, it send a list of all URLs to stdout.

Relative to urlview, urlscan has the following additional features:

  • Support for emails in quoted-printable and base64 encodings. No more stripping out =40D from URLs by hand!

  • The context of each URL is provided along with the URL. For HTML mails, a crude parser is used to render the HTML into text.

Installation and setup

To install urlscan, install from your distribution repositories, from Pypi, install the Archlinux Package , or install from source using setup.py.

Once urlscan is installed, add the following lines to your .muttrc:

macro index,pager cb “<pipe-message> urlscan<Enter>” “call urlscan to extract URLs out of a message”

macro attach,compose cb “<pipe-entry> urlscan<Enter>” “call urlscan to extract URLs out of a message”

Once this is done, Control-b while reading mail in mutt will automatically invoke urlscan on the message.

To choose a particular browser, set the environment variable BROWSER:

export BROWSER=/usr/bin/epiphany

Command Line usage

urlscan [-n] <file>

Urlscan can extract URLs and email addresses from emails, or any text file. Calling without the ‘-n’ flag will start the curses browser. Calling with ‘-n’ will just output a list of URLs/email addressess to stdout. Files can also be piped to urlscan using normal shell pipe mechanisms: cat <something> | urlscan or urlscan < <something>

Known bugs and limitations

  • Running urlscan sometimes “messes up” the terminal background. This seems to be an urwid bug, but I haven’t tracked down just what’s going on.

  • Extraction of context from HTML messages leaves something to be desired. Probably the ideal solution would be to extract context on a word basis rather than on a paragraph basis.

  • The HTML message handling is a bit kludgy in general.

  • multipart/alternative sections are handled by descending into all the sub-parts, rather than just picking one, which may lead to URLs and context appearing twice.

  • Configurability is more than a little bit lacking.

Metadata

Release files for urlscan 0.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for urlscan 0.8.2
File Size Uploaded
urlscan-0.8.2.tar.gz 17.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for urlscan 0.8.2
File Interpreter ABI Platform
urlscan-0.8.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 39.0 kB

Release files / urlscan-0.8.2.tar.gz

Download URL urlscan-0.8.2.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
13ff4fed6da5d25d5a57eb57eed4e816ef9f9d7224bdf99c9868f356f5fb1896
BLAKE2b-256 checksum
How to use checksums
af66279dcb8b016f101be433afbdbf15e6ba2395d0231e9e8b6f26c0b2730cc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / urlscan-0.8.2-py2.py3-none-any.whl

Download URL urlscan-0.8.2-py2.py3-none-any.whl
Size 21.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c51ddf9b7a64f48babe99d8f06374f361e3a06b9807cc8113fdedf65be40d9e2
BLAKE2b-256 checksum
How to use checksums
81b42687d77af10806a1dbba48d2894bfa5a25f3349fe2d52ada13b0be1a9499
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.1.2

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.3

3 release files

This release

0.8.2 This release

2 release files

0.8.1

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page