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.3.tar.gz (6.8 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.3-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grabpy-0.1.3.tar.gz
  • Upload date:
  • Size: 6.8 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.3.tar.gz
Algorithm Hash digest
SHA256 61f025693d431b300c74a80bd17474d7c9bf118492730a5d546c6559598bcdec
MD5 3a6c17ad55c0d527401d8ae1883107ab
BLAKE2b-256 f47f72527a2634c985e54556be74e107dd2486f97464fb47f9d70e3b12a34c80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grabpy-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2fbec62e1d677167d85a6ad8b273b5e895ee9940b27d8a0762ddbab215c437eb
MD5 d6b9e450dd1ef1664d9a1c18f9093cd6
BLAKE2b-256 d0b700f02f12421f334413eb49b8e2864ceb95ad65b422a8822eec3429f5a4cb

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