Skip to main content

Clip web pages html and store in Django

Project description

Django KAOS web clipper

Clip web pages html and store in Django

Quick start

pip install dj-kaos-webclipper

Add webclipper to INSTALLED_APPS if you want to use the generic webclip model, or extend AbstractWebClip if you want to customize it on your application.

If you go with the generic WebClip model, you can get REST endpoint by using the router defined in rest.routes.

Your end users will send the title, URL and HTML content of the page using the REST API endpoint, and they get saved to the models. You can extend the WebClip model in a proxy model, and extend RawItemMixin from the library, which gives you an interface to parse the page using Scrapy's API.

Development and Testing

IDE Setup

Add the example directory to the PYTHONPATH in your IDE to avoid seeing import warnings in the tests modules. If you are using PyCharm, this is already set up.

Running the Tests

Install requirements

pip install -r requirements.txt

For local environment

pytest

For all supported environments

tox

Project details


Download files

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

Source Distribution

dj-kaos-webclipper-0.1.0.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

dj_kaos_webclipper-0.1.0-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page