Skip to main content

Python parser for Apache/nginx-style HTML directory listing

import htmllistparse
cwd, listing = htmllistparse.fetch_listing(some_url, timeout=30)

# or you can get the url and make a BeautifulSoup yourself, then use
# cwd, listing = htmllistparse.parse(soup)

where cwd is the current directory, listing is a list of FileEntry named tuples:

  • name: File name, str. Have a trailing / if it’s a directory.

  • modified: Last modification time, time.struct_time or None. Timezone is not known.

  • size: File size, int or None. May be estimated from the prefix, such as “K”, “M”.

  • description: File description, file type, or any other things found. str as HTML, or None.

Supports:

  • Vanilla Apache/nginx/lighttpd/darkhttpd autoindex

  • Most <pre>-style index

  • Many other <table>-style index

  • <ul>-style

ReHTTPFS

Reinvented HTTP Filesystem.

  • Mounts most HTTP file listings with FUSE.

  • Gets directory tree and file stats with less overhead.

  • Supports Range requests.

  • Supports Keep-Alive.

usage: rehttpfs.py [-h] [-o OPTIONS] [-t TIMEOUT] [-u USER_AGENT] [-v] [-d]
                   url mountpoint

Mount HTML directory listings.

positional arguments:
  url                   URL to mount
  mountpoint            filesystem mount point

optional arguments:
  -h, --help            show this help message and exit
  -o OPTIONS            comma separated FUSE options
  -t TIMEOUT, --timeout TIMEOUT
                        HTTP request timeout
  -u USER_AGENT, --user-agent USER_AGENT
                        HTTP User-Agent
  -v, --verbose         enable debug logging
  -d, --daemon          run in background

Release files for htmllistparse 0.6.1

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

Source distribution (sdist)

Source distribution for htmllistparse 0.6.1
File Size Uploaded
htmllistparse-0.6.1.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for htmllistparse 0.6.1
File Interpreter ABI Platform
htmllistparse-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.0 kB

Release files / htmllistparse-0.6.1.tar.gz

Download URL htmllistparse-0.6.1.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6dc8a6bf03c843b9d325843a26a2351a795b573cd92a2c9b8271621019c64082
BLAKE2b-256 checksum
How to use checksums
474f6c57a2817e4f20c1ed8dcca24ee036f981ed036f4b36d07a0100303db96a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / htmllistparse-0.6.1-py3-none-any.whl

Download URL htmllistparse-0.6.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed027107de47bf18c7059db156075267947a828d3d72ab02823fbef0f39481a9
BLAKE2b-256 checksum
How to use checksums
43fbfed3185cb09dd7b7e06207a8b33767f1a3f9765e856394ad84b538a1b6ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

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