Skip to main content

Simple package for requesting web pages that respects robots.txt

Project description

Grabpy

Simple respectful web scraper

INSTALLING

How to install Grabpy.

pip install grabpy

USING

How to use Grabpy to fetch pages or download content.

from grabpy import Grabber

with Grabber('useragent/0.1', retries=3) as grabber:
    content = grabber.get('https://www.example.org')
    
    if grabber.download('https://www.example.org/music.mp3', 'music.mp3'):
        print('Download successful.')
    else:
        print('Download failed.')

LOGGING

How to enable logging for this package.

import logging

logging.basicConfig(level=logging.DEBUG)
logging.getLogger('grabpy').setLevel(logging.DEBUG)
logging.getLogger().setLevel(logging.WARNING)

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

grabpy-0.1.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

grabpy-0.1.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file grabpy-0.1.2.tar.gz.

File metadata

  • Download URL: grabpy-0.1.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for grabpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9096590fbe693655b9934c9d401b72eed676cfb36b57d678cfbef3b206807664
MD5 f895923246141e24bafbfb6c9a5ca859
BLAKE2b-256 1b5c945f15dc683afd67a31dea290153a6a4bb4b168931471129430b2b5213dd

See more details on using hashes here.

File details

Details for the file grabpy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: grabpy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for grabpy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f78430725415a075d4f2eb11c1d985c331eff0aba3c1fa50f9ab6bd1f2974067
MD5 d44e805b23af9ced45d0dcaac167f77c
BLAKE2b-256 8474cbec1e510e43a981d8f3473901cd83e3b90862e27399c6e67a546094b7eb

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