Skip to main content

lurk

A script which extracts HTML from web pages that match a certain CSS pattern.

$ pip install lurk

usage

in python

In python, lurk returns a dictionary:

from lurk import lurk

for link in lurk('http://en.wikipedia.org/wiki/en', 'a'):
    if 'href' in link:
        print link['href']

in bash

In bash, lurk returns JSON.

Familiarize yourself with CSS attribute selectors.

$ lurk \
http://www.gnu.org/software/libc/manual/html_node/Function-Index.html \
'a[href*="#index-"]' \
> links.json

This command saves a JSON object containing an array of links to all GNU C functions into links.json:

[
  {
    "code": "*pthread_getspecific",
    "href": "Thread_002dspecific-Data.html#index-_002apthread_005fgetspecific"
  },

  {
    "code": "*sbrk",
    "href": "Resizing-the-Data-Segment.html#index-_002asbrk"
  },

  // ...
]

Release files for lurk 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lurk 0.1.3
File Size Uploaded
lurk-0.1.3.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lurk 0.1.3
File Interpreter ABI Platform
lurk-0.1.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 6.5 kB

Release files / lurk-0.1.3.tar.gz

Download URL lurk-0.1.3.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5c93d12d655d65cb7de0457522c99f050f2ab96fa2f34e2e348ef6d315ab1469
BLAKE2b-256 checksum
How to use checksums
5889d29d51c32ed231abe81b1b1731306af1df2c8e70bc64cca0c874c5255090
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / lurk-0.1.3-py2.py3-none-any.whl

Download URL lurk-0.1.3-py2.py3-none-any.whl
Size 4.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8df1928e56c4985225877202d59f20c3f685c3f3092daf04db309c69841a2dcb
BLAKE2b-256 checksum
How to use checksums
0d5a6cb368063cb8409b0213e256c3ba611e931ddc14e8c277eaa32384d7fb5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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