Skip to main content

Generic crawling for web galleries

Project description

https://github.com/idlesign/gallerycrawler

release lic

Description

Generic crawling for galleries

  1. Crawler starts from gallery listing URL;

  2. It visits every details page mentioned on current listing page;

  3. It gathers information from each details page;

  4. It moves to the next listing URL.

  5. Etc.

from galerycrawler.toolbox import Crawler, dump

# Define crawler.
class MyCrawler(Crawler):

    selector_listing_next: str = '.page-next a'
    selector_listing_thumbnails: str = '.thumbnail img'
    selector_details: str = '.page-details a'
    selector_details_title: str = '.page-title'
    selector_details_img: str = '.image img'
    selector_details_author: str = '.image-author'

# Run dumping.
dump(
    crawler=MyCrawler,
    url='https://mysite.some/gallery/',
    fpath='dumped.html',
    probe=True,  # Use this to quick test your crawler
)

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

gallerycrawler-0.1.0.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

gallerycrawler-0.1.0-py2.py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 2 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