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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file dj-kaos-webclipper-0.1.0.tar.gz.

File metadata

  • Download URL: dj-kaos-webclipper-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for dj-kaos-webclipper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c83ef9ef0d927279a63828c2342e02dc41173085b90793f6b8d1be7ba5ffac38
MD5 eb3adf40fb6c44c17f2b4380a5da4db7
BLAKE2b-256 8108397d8ee27546c51e90c45468ff9ff01e8df971b516e71b4de82a5e61fdd8

See more details on using hashes here.

File details

Details for the file dj_kaos_webclipper-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dj_kaos_webclipper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 064cb282124885bf5b0c4c0c2ba6c0694b24d0996e3e0a7952b3be677249b129
MD5 03326c1e60309de37f5cf79b1a06c7a5
BLAKE2b-256 32284349a0f3f002a5bf95cc521c12db94da349cacc02b6f85bc28bbfbffea1b

See more details on using hashes here.

Supported by

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