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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61f025693d431b300c74a80bd17474d7c9bf118492730a5d546c6559598bcdec
|
|
| MD5 |
3a6c17ad55c0d527401d8ae1883107ab
|
|
| BLAKE2b-256 |
f47f72527a2634c985e54556be74e107dd2486f97464fb47f9d70e3b12a34c80
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fbec62e1d677167d85a6ad8b273b5e895ee9940b27d8a0762ddbab215c437eb
|
|
| MD5 |
d6b9e450dd1ef1664d9a1c18f9093cd6
|
|
| BLAKE2b-256 |
d0b700f02f12421f334413eb49b8e2864ceb95ad65b422a8822eec3429f5a4cb
|