Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Extract html from one or multiple urls

Project description

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

$ pip install lurk


in python

In python, lurk returns a dictionary:

from lurk import lurk

for link in lurk('', 'a'):
    if 'href' in link:
        print link['href']

in bash

In bash, lurk returns JSON.

Familiarize yourself with CSS attribute selectors.

$ lurk \ \
'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"

  // ...

Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


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
lurk-0.1.3-py2.py3-none-any.whl (4.1 kB) Copy SHA256 hash SHA256 Wheel 2.7 Oct 24, 2015
lurk-0.1.3.tar.gz (2.4 kB) Copy SHA256 hash SHA256 Source None Oct 24, 2015

Supported by

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