Skip to main content

Alters css selector names across css files and html templates.

Project description

LiquidCSS

Command line tool for hashing selector names across CSS, HTML and JavaScript files.

Description & Implementation

The tool makes most scraping robots obsolete by dynamically hashing all selectors across the entire infrastructure of a web application. Most scraping tools achieve their objective by hooking onto certain HTML selector names in the response document. LiquidCSS offers up a way to counter act this approach by changing the selector names without breaking any of the functionality or appearance of the web application.

Install the package with: pip install liquidcss
https://pypi.org/project/liquidcss/

Usage

To begin using the tool first create a WorkSpace: liquid init
Register files to the WorkSpace either individually or by specifying a txt document containing a list of paths:
liquid grab /path/to/file or liquid grab -r paths.txt Once files are registered, view their status inside the WorkSpace:liquid status -a

[ID: 0]
    name: sample001.css
    path: /example/original/sample001.css
    type: css
    hash: 603706f3aa0a9b7779fca2acd29d4b8e5a68796f846f955c6ac6e72b6f13081a
    staged: True
    deployed: False

Hash the selector names across all registered files: liquid stage -a

The selector names will be hashed only if they are present in the CSS files registered in the workspace. The files are now ready to be deployed. The deploy command will swap the files at the registered paths with the hashed files and create a backup of the original files:liquid deploy -a

Reverse the deployment of the files with hashed selectors and replace them with files stored in backup: liquid deploy -a -r

JavaScript files registered with the WorkSpace can only contain const or var key words and only the selector names as strings include the . or the #. See the examples in the example folder.

More extensive documentation and further features are in development.

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

liquidcss-1.0.2.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

liquidcss-1.0.2-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file liquidcss-1.0.2.tar.gz.

File metadata

  • Download URL: liquidcss-1.0.2.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for liquidcss-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a75cc6ccbf7ddc769209e5e84af6043aa5ab6145dbdaa00c26f0b5ebfee10dab
MD5 ad5e1952e6e3d6370aafaf01de887af8
BLAKE2b-256 115109d00d9c531481640903258300bd2e88dc1ed8ca173f6bcbc73c42c4d933

See more details on using hashes here.

File details

Details for the file liquidcss-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: liquidcss-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.6

File hashes

Hashes for liquidcss-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6339245cb315f721069b0636e6e11fbd4ec0b08d608d3b5bd614b958ecbc941a
MD5 cc2106eae0a4fd3901b0ec9cc5775a86
BLAKE2b-256 b251db2a17dc01bbffa96c76756b9d22464e129b82497e8b438af663aaa8250c

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