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.1.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.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grabpy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 81ed5ada0a848d1a6ac2764b7ddbca48d1acecaf9762b05608334c85f3fb44b5
MD5 f9f91073af46639ad236ffafbbe1f898
BLAKE2b-256 eb21806168c33491c5262f0622a4cf3d331a34310c8e28cfac4023dc266b9474

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grabpy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abc1ada0f7f960f92e78a4b6e1c65ec6fea5c03bd2233e0a98c28d263e09024b
MD5 b95413b7b8763fcf9da80fbc1ab88157
BLAKE2b-256 51ec064231835ebb3cbaa0342bfe71c8666ad51723da2b888b3cc1b03764829c

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