Socket
Socket
Sign inDemoInstall

gallerycrawler

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gallerycrawler

Generic crawling for web galleries


Maintainers
1

gallerycrawler

https://github.com/idlesign/gallerycrawler

|release| |lic|

.. |release| image:: https://img.shields.io/pypi/v/gallerycrawler.svg :target: https://pypi.python.org/pypi/gallerycrawler

.. |lic| image:: https://img.shields.io/pypi/l/gallerycrawler.svg :target: https://pypi.python.org/pypi/gallerycrawler

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.

.. code-block:: python

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
)

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc