Iterate through Craig's list
Project description
Craig's Generator
======
Read listings Pythonically.
Examples
---------
Generate listings.
from craigsgenerator import Section
for listing in Section('oakland','sub'):
print(listing)
Additional arguments get passed to ``requests.get``.
from craigsgenerator import Section
proxies = {'https':'example.com'}
for listing in Section('oakland','sub', proxies = proxies):
print(listing)
Downloaded files are cached by default and refreshed
if they're older than a day. Change the directory by
specifying the ``cachedir``.
from craigsgenerator import Section
for listing in Section('oakland','sub', cachedir = 'downloads'):
print(listing)
Disable caching by setting the ``cachedir`` to ``None``.
from craigsgenerator import Section
for listing in Section('oakland','sub', cachedir = None):
print(listing)
======
Read listings Pythonically.
Examples
---------
Generate listings.
from craigsgenerator import Section
for listing in Section('oakland','sub'):
print(listing)
Additional arguments get passed to ``requests.get``.
from craigsgenerator import Section
proxies = {'https':'example.com'}
for listing in Section('oakland','sub', proxies = proxies):
print(listing)
Downloaded files are cached by default and refreshed
if they're older than a day. Change the directory by
specifying the ``cachedir``.
from craigsgenerator import Section
for listing in Section('oakland','sub', cachedir = 'downloads'):
print(listing)
Disable caching by setting the ``cachedir`` to ``None``.
from craigsgenerator import Section
for listing in Section('oakland','sub', cachedir = None):
print(listing)
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
craigsgenerator-0.0.2.tar.gz
(2.7 kB
view details)
File details
Details for the file craigsgenerator-0.0.2.tar.gz.
File metadata
- Download URL: craigsgenerator-0.0.2.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fcab9e2b39824605410e605629b9e1ac303b3ab1ecfa6c0cb4e7592ba026034
|
|
| MD5 |
34c970e3747d32b3c08a0683b2e36667
|
|
| BLAKE2b-256 |
dc0c957c147ae16932f7792f268a2078c37861ce104c4f939bd1011397184cc8
|