Skip to main content

boxfish: lightweight table extraction from HTML

PyPI PyPI - Status PyPI - License PyPI - Python Version

GitHub top language Code Style

What is it?

Boxfish is a lightweight tool for table extraction from HTML pages.

Main features

  • Easy configuration. No knowledge of CSS or Xpaths required.
  • Fast table extraction to CSV files.
  • Integration of requests and selenium.

Quick start

import boxfish as bf
import pandas as pd

# Define table layout of an url with strings from two rows.
aurl = ""
row1 = ""
row2 = ""

# Build a configuration 
aconfig = bf.build(url=aurl, rows = [row1, row2])

# Extract a table
data = bf.extract(aconfig, url=aurl)

# View results
df = pd.DataFrame(data)
df.head() 

Where to get it?

Boxfish is available on Pypi and Github.

pip install boxfish

Dependencies

The main dependencies are:

  • BeautifulSoup4, a Python library for pulling data out of HTML and XML files.
  • lxml, a powerful and Pythonic XML processing library.
  • Requests, a simple, yet elegant, HTTP library.
  • Selenium, automated web browser interaction from Python.

License

Boxfish is available with an MIT license.

Limitations

Boxfish extracts text from HTML. To see if the HTML file contains the text of interest, open the page in a browser, then access the HTML in the developer tools via Cntrl+Shift+ I.

Documentation

Full documentation is available here.

Release files for boxfish 0.1.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 boxfish 0.1.2
File Size Uploaded
boxfish-0.1.2.tar.gz 27.6 kB Details

Built distribution (wheel)

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

Total release size: 58.3 kB

Release files / boxfish-0.1.2.tar.gz

Download URL boxfish-0.1.2.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
623cd4d507f255e9299b80ae0a3ff8d8b52388245b86cab102c55b08968c1152
BLAKE2b-256 checksum
How to use checksums
e61edf51a537cca5bb1facda648e836f029ee923cfa743734cc6da6fa9cdc9d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release files / boxfish-0.1.2-py3-none-any.whl

Download URL boxfish-0.1.2-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a6958437343290d653f3bb07b595d55d2e4b75f4770b562f643806f8270618b
BLAKE2b-256 checksum
How to use checksums
6da95ad8e613959e0cfa335dcefb6dbf810606eb2751d9f34bc3486975e2da25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

1 release file

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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