Skip to main content

a Python library for creating custom objects of webpage content

Project description

# soupcan

soupcan is a Python library for creating interface objects of webpage content. Using [Requests]( and [BeautifulSoup]( under the hood, this library make it easy to design modular interfaces for selected HTML content, or groups of content, found on a webpage. Anyone needing a way to build interfaces to display and analyse web content are welcome to use this library. The ideal for use in a Jupyter notebook.

## Installation

<a href=""><img src="" /></a>

## Basic Usage

Retrieve a webpage:
import soupcan
page = soupcan.BasePage.from_url({URL})

Access a table (content) from a page using `soupcan`'s (pre-designed) `Table` class:
from soupcan.common import Table
table = page.get(Table)

Create your own custom interface object:
class MyTableHeader(soupcan.Interface):
_soup_kwargs = {"name": 'thead'}

class MyTableBody(soupcan.Interface):
_soup_kwargs = {"name": 'tbody'}

class MyTable(soupcan.Interface):
_soup_kwargs = {"name": 'table'}

def header(self):

def body(self):

mytable = page.get(MyTable)

print(mytable.header) #
print(mytable.body) #

## Disclamer

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
soupcan-0.0.1a1-py3-none-any.whl (7.3 kB) Copy SHA256 hash SHA256 Wheel py3
soupcan-0.0.1a1.tar.gz (4.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page